Interaction logic for SyncSettingPage.xaml
Inheritance: System.Windows.Controls.Page
Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();
            //init log
            Log.Init();

            try
            {
                string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
                this.Title = string.Format("{0} v{1}", this.Title, version);
                //init tray
                this.nIcon                   = new NotifyIcon();
                this.nIcon.Text              = "QSunSync 七牛云文件同步";
                this.nIcon.BalloonTipText    = "QSunSync 七牛云文件同步";
                this.nIcon.Icon              = new System.Drawing.Icon("sunsync.ico");
                this.nIcon.Visible           = false;
                this.nIcon.MouseDoubleClick += NotifyIcon_MouseDoubleClick_EventHandler;
                this.nIcon.ShowBalloonTip(2000);
                MenuItem exitItem = new MenuItem("退出 QSunSync");
                exitItem.Click += ExitApp_EventHandler;
                ContextMenu ctxMenu = new ContextMenu(new MenuItem[] { exitItem });
                this.nIcon.ContextMenu = ctxMenu;
            }
            catch (Exception ex)
            {
                Log.Error("init the tray icon failed, " + ex.Message);
            }

            //init pages
            this.quickStartPage     = new QuickStartPage(this);
            this.accountSettingPage = new AccountSettingPage(this);
            this.syncSettingPage    = new SyncSettingPage(this);
            this.syncProgressPage   = new SyncProgressPage(this);
            this.syncResultPage     = new SyncResultPage(this);
        }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();
            //init log
            Log.Init();

            try
            {
                string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
                this.Title =string.Format("{0} v{1}", this.Title,version);
                //init tray
                this.nIcon = new NotifyIcon();
                this.nIcon.Text = "QSunSync 七牛云文件同步";
                this.nIcon.BalloonTipText = "QSunSync 七牛云文件同步";
                this.nIcon.Icon = new System.Drawing.Icon("sunsync.ico");
                this.nIcon.Visible = false;
                this.nIcon.MouseDoubleClick += NotifyIcon_MouseDoubleClick_EventHandler;
                this.nIcon.ShowBalloonTip(2000);
                MenuItem exitItem = new MenuItem("退出 QSunSync");
                exitItem.Click += ExitApp_EventHandler;
                ContextMenu ctxMenu = new ContextMenu(new MenuItem[] { exitItem });
                this.nIcon.ContextMenu = ctxMenu;
            }
            catch (Exception ex)
            {
                Log.Error("init the tray icon failed, " + ex.Message);
            }

            //init pages
            this.quickStartPage = new QuickStartPage(this);
            this.accountSettingPage = new AccountSettingPage(this);
            this.syncSettingPage = new SyncSettingPage(this);
            this.syncProgressPage = new SyncProgressPage(this);
            this.syncResultPage = new SyncResultPage(this);
        }