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

            button_add.IsEnabled         = IniFileHandler.CanUpdateInifile;
            textBox_ext.IsEnabled        = IniFileHandler.CanUpdateInifile;
            label2.IsEnabled             = IniFileHandler.CanUpdateInifile;
            button_del.IsEnabled         = IniFileHandler.CanUpdateInifile;
            button_chk_del.IsEnabled     = IniFileHandler.CanUpdateInifile;
            button_chk_add.IsEnabled     = IniFileHandler.CanUpdateInifile;
            button_chk_open.IsEnabled    = IniFileHandler.CanUpdateInifile;
            textBox_chk_folder.IsEnabled = IniFileHandler.CanUpdateInifile;
            button_OK.IsEnabled          = IniFileHandler.CanUpdateInifile;

            var bxe = new BoxExchangeEditor(null, listBox_ext, true);
            var bxc = new BoxExchangeEditor(null, listBox_chk_folder, true);

            listBox_ext.SelectionChanged        += ViewUtil.ListBox_TextBoxSyncSelectionChanged(listBox_ext, textBox_ext);
            listBox_chk_folder.SelectionChanged += ViewUtil.ListBox_TextBoxSyncSelectionChanged(listBox_chk_folder, textBox_chk_folder);
            if (CommonManager.Instance.NWMode == false)
            {
                bxe.AllowKeyAction();
                bxe.AllowDragDrop();
                button_del.Click += new RoutedEventHandler(bxe.button_Delete_Click);
                button_add.Click += ViewUtil.ListBox_TextCheckAdd(listBox_ext, textBox_ext);
                bxc.AllowKeyAction();
                bxc.AllowDragDrop();
                button_chk_del.Click += new RoutedEventHandler(bxc.button_Delete_Click);
                button_chk_add.Click += ViewUtil.ListBox_TextCheckAdd(listBox_chk_folder, textBox_chk_folder);
            }
        }
        public SetAppCancelWindow()
        {
            InitializeComponent();

            button_process_del.IsEnabled        = IniFileHandler.CanUpdateInifile;
            label2.IsEnabled                    = IniFileHandler.CanUpdateInifile;
            textBox_process.IsEnabled           = IniFileHandler.CanUpdateInifile;
            button_process_add.IsEnabled        = IniFileHandler.CanUpdateInifile;
            button_process_open.IsEnabled       = IniFileHandler.CanUpdateInifile;
            label3.IsEnabled                    = IniFileHandler.CanUpdateInifile;
            textBox_ng_min.IsEnabled            = IniFileHandler.CanUpdateInifile;
            label4.IsEnabled                    = IniFileHandler.CanUpdateInifile;
            checkBox_ng_fileStreaming.IsEnabled = IniFileHandler.CanUpdateInifile;
            checkBox_ng_shareFile.IsEnabled     = IniFileHandler.CanUpdateInifile;
            textBox_ng_usePC_min.IsEnabled      = IniFileHandler.CanUpdateInifile;
            label7.IsEnabled                    = IniFileHandler.CanUpdateInifile;
            checkBox_ng_usePC.IsEnabled         = IniFileHandler.CanUpdateInifile;
            button_OK.IsEnabled                 = IniFileHandler.CanUpdateInifile;

            var bx = new BoxExchangeEditor(null, listBox_process, true);

            listBox_process.SelectionChanged += ViewUtil.ListBox_TextBoxSyncSelectionChanged(listBox_process, textBox_process);
            if (CommonManager.Instance.NWMode == false)
            {
                bx.AllowKeyAction();
                bx.AllowDragDrop();
                button_process_del.Click += new RoutedEventHandler(bx.button_Delete_Click);
                button_process_add.Click += ViewUtil.ListBox_TextCheckAdd(listBox_process, textBox_process);
            }
        }