Example #1
0
        public VsPersonal()
        {
            InitializeComponent();

            // form load handler
            this.Load        += new EventHandler(VsMonitor_Load);
            this.Resize      += new EventHandler(VsMonitor_Resize);
            this.FormClosing += new FormClosingEventHandler(VsMonitor_FormClosing);

            try
            {
                // new object
                vsCoreMonitor = new VsCoreServer(Path.GetDirectoryName(Application.ExecutablePath));

                // allow to save all configs to files
                vsCoreMonitor.SaveConfigToFile = true;

                // Initial application core
                vsCoreMonitor.VsMonitorInitial();

                VsSplasher.Status = "Load application setting...";
                System.Threading.Thread.Sleep(1500);

                VsSplasher.Close();
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
Example #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            VsSplasher.Show(typeof(VsSplasherView));
            Application.Run(new VsScanner());
        }
Example #3
0
        public VsLive()
        {
            try
            {
                InitializeComponent();

                Vs.Monitor.VsSplasher.Status = "Load application setting...";
                System.Threading.Thread.Sleep(1000);

                Vs.Monitor.VsSplasher.LoginSerivce();

                while (Vs.Monitor.VsSplasher.Blocked)
                {
                    System.Threading.Thread.Sleep(100);
                }


                if (!Vs.Monitor.VsSplasher.Connected)
                {
                    this.Hide();
                    bCancel = true;

                    // this.Close();
                    //VsMonitor_Close();

                    return;
                }
                else
                {
                    //VsSplasher.Close();

                    // form load handler
                    this.Load        += new EventHandler(VsMonitor_Load);
                    this.Resize      += new EventHandler(VsMonitor_Resize);
                    this.FormClosing += new FormClosingEventHandler(VsMonitor_FormClosing);


                    //Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);

                    // new object
                    string configPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "OpenVss\\VsClient\\");;
                    vsCoreMonitor = new VsCoreServer(Path.GetDirectoryName(Application.ExecutablePath));

                    // allow to save all configs to files
                    vsCoreMonitor.SaveConfigToFile = true;

                    // Initial application core
                    vsCoreMonitor.VsMonitorInitial(configPath);
                }
                VsSplasher.Close();
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
Example #4
0
        static void Main()
        {
            System.IO.Directory.SetCurrentDirectory(
                System.IO.Path.GetDirectoryName(
                    System.Reflection.Assembly.GetExecutingAssembly().Location));

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            VsSplasher.Show(typeof(VsSplasherView));
            Application.Run(new VsMonitor());
        }
Example #5
0
        void VsMonitor_Load(object sender, EventArgs e)
        {
            VsSplasher.Close();

            this.vsLiveviewTool1.CoreMonitor = vsCoreMonitor;
            this.vsLiveviewTool1.Monitor     = this;

            this.vsSettingTool1.CoreMonitor = vsCoreMonitor;
            this.vsSettingTool1.Monitor     = this;

            // set reference to application control
        }