Esempio n. 1
0
 public Form1()
 {
     InitializeComponent();
     Printer           = new printer(print);
     Cleaner           = new cleaner(clearChat);
     chat_msg.Enabled  = false;
     chat_send.Enabled = false;
     //connect();
     //_clientThread = new Thread(listner);
     //_clientThread.IsBackground = true;
     //_clientThread.Start();
 }
Esempio n. 2
0
        public static void tryInternal()
        {
            tryAccesser tA = new tryAccesser();

            Console.WriteLine(tA.i);

            printer pt = new printer("this is renee");

            if (pt is printer)
            {
                pt.print();
            }
        }
Esempio n. 3
0
        public TestWindow(string User)
        {
            InitializeComponent();
            //this.Topmost = true;
            _printer = new printer();

            _managers     = Managers.CreateManagers();
            _mysqlManager = _managers.GetMySQLManager();
            _autoUpdate   = AUTOUPDATE.AutoUpdate.CreateAutoUpdate();

            _login = User;
            txtSN.Focus();
        }
Esempio n. 4
0
        public chatForm()
        {
            InitializeComponent();
            Printer    = new printer(print);
            Cleaner    = new cleaner(clearChat);
            UPrint     = new UserPrinter(UpdateOnlineList);
            bw.DoWork += new DoWorkEventHandler(bw_setName);

            connect();
            UserThread = new Thread(listner);
            UserThread.IsBackground = true;
            UserThread.Start();
        }
Esempio n. 5
0
 private void Connection() // подключение к серверу
 {
     // создаем экземпляры делегатов
     Printer            = new printer(Print);
     PrinterOnlineUsers = new printer(PrintOnlineUsers);
     Cleaner            = new cleaner(ClearChat);
     CleanerOnlineUsers = new cleaner(ClearOnlineUsers);
     _connection        = Connect();          // конектимся к серверу
     _clientThread      = new Thread(Listner) // запускаем прослушиваение в потоке
     {
         IsBackground = true                  // делаем поток фоновым
     };
     _clientThread.Start();                   // запускаем поток
 }
        // GET: Contacts/Details/5
        public ActionResult _Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            printer printer = db.printer.Find(id);

            if (printer == null)
            {
                return(HttpNotFound());
            }
            return(PartialView(printer));
        }
        public Form1()
        {
            InitializeComponent();

            Printer      = new printer(print);
            Cleaner      = new cleaner(clearDbView);
            CreateMsgBox = new createMsgBox(msgBox);

            connect();
            _clientThread = new Thread(listner);
            _clientThread.IsBackground = true;
            _clientThread.Start();

            send("#refreshview");
        }
        // GET: Contacts/Edit/5
        public ActionResult _Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            printer printer = db.printer.Find(id);

            if (printer == null)
            {
                return(HttpNotFound());
            }
            ViewBag.dept  = GetDeptList(printer.department);
            ViewBag.ptype = GetTypeList(printer.type);
            return(PartialView(printer));
        }
Esempio n. 9
0
    static void Main(string[] args)
    {
        bool x = true;

        printer del = delegate
        {
            if (x)
            {
                MethodA();
            }
            else
            {
                MethodB();
            }
        };

        del();
        Console.ReadKey();
    }
Esempio n. 10
0
        public ChatForm(Account user, MySQLConnection con, MainMenu main_menu, User companion_)
        {
            string Host = Dns.GetHostName();
            string IP   = Dns.GetHostByName(Host).AddressList[0].ToString();//Определение IP-адреса сервера StudChatServer

            server_host  = IP;
            your_account = user;
            connection   = con;
            menu         = main_menu;
            companion    = companion_;
            InitializeComponent();
            name    = your_account.name + " " + your_account.surname + "(" + your_account.nickname + ")";
            Printer = new printer(Print);
            Cleaner = new cleaner(ClearChat);
            //Создание соединения с сервером
            Connection();
            //Запуск соединения с сервером через поток
            client_thread = new Thread(Listener);
            client_thread.IsBackground = true;
            client_thread.Start();
        }
Esempio n. 11
0
    public static void Main(string[] args)
    {
        //abstract class
        Console.WriteLine("ABSTRACT CLASS");
        perpustakaan perpustakaan;

        perpustakaan = new penjagaperpustakaan();
        perpustakaan.pinjam();
        perpustakaan.kembalikan();

        Console.WriteLine();
        perpustakaan = new peminjam();
        perpustakaan.pinjam();
        perpustakaan.kembalikan();

        Console.WriteLine();
        Console.WriteLine();

        //interface
        Console.WriteLine("INTERFACE");
        Ifotocopy fotocopy;

        fotocopy = new scanner();
        fotocopy.info();
        fotocopy.fungsi();

        Console.WriteLine();
        fotocopy = new printer();
        fotocopy.info();
        fotocopy.fungsi();

        Console.WriteLine();
        fotocopy = new jilid();
        fotocopy.info();
        fotocopy.fungsi();
    }
Esempio n. 12
0
 public Encoder(printer p = default)
 {
     this.p = p;
 }
Esempio n. 13
0
 public chatForm()
 {
     InitializeComponent();
     Printer = new printer(print);
     Cleaner = new cleaner(clearChat);
 }
Esempio n. 14
0
this.Print(printer);
Esempio n. 15
0
 // конструктор класса
 public ChatForm()
 {
     InitializeComponent();
     Printer = new printer(print);
 }
Esempio n. 16
0
        static void Main(string[] args)
        {
            printer p = printer.getPrinter();

            p.display();
        }