3
Answers

If the aplication is inactive 2 or 3 minutes it must automatically logout.(may be using timer control)


The application is built using wpf and C# in (.net 3.5), in this  the application should automatically logout if it is inactive for few minutes.  i think one way is to use timer control and no ideas about other ways to do this task , if you know the concept and code for this using timercontrol or any other way, please guide me.

Answers (3)

0
Photo of Santhosh Kumar Jayaraman
NA 9.9k 2.3m 12y
try this

class Program
    {
        static void Main(string[] args)
        {
            char[,] arr = new char[4, 4];
            Console.WriteLine("enter 4 four charcter words in seperate lines.\nthat is press enter after each                 word");
            
            //saving in an 2D array
            for (int i = 0; i < 4; i++)
            {
                string str = Console.ReadLine();
                for (int j = 0; j < 4; j++)
                {                   
                    arr[i, j] = str[j];
                }
            }

            //displaying 2D array
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    Console.Write("{0}\t", arr[i, j]);
                }
                Console.WriteLine();
            }
            Console.ReadLine();

        }
    }
0
Photo of Ehtesham
NA 1.3k 191k 12y
static void Main(string[] args)
        {
            char[,] arr = new char[4, 4];
            Console.WriteLine("enter 4 four charcter words in seperate lines.\nthat is press enter after each  word");

            //saving in an 2D array
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    string str = Console.ReadLine();
                    arr[i, j] = str[0];

                }
            }

            //displaying 2D array
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    Console.Write("{0}\t", arr[i, j]);
                }
                Console.WriteLine();
            }
            Console.ReadLine();
        }