Exemple #1
0
        public SettingsWindow(Action <List <FileExplorerWindow.UrlLocation>, bool> SaveCallback)
        {
            customEditorClass = new CustomEditorClass(this);
            InitializeComponent();
            RegisterEvents();

            this.SaveCallback += SaveCallback;

            this.listView1.ListViewItemSorter = new CustomEditorClass.ListViewItemComparer(1);

            checkBox1.Checked = Properties.Settings.Default.REMEMBER_ME;
            checkBox2.Checked = Properties.Settings.Default.REMEMBER_LOCATION;

            comboBox1.SelectedItem = Properties.Settings.Default.DOUBLE_CLICK_ACTION;
            //System.Windows.Forms.ListViewItem listViewItem;

            //int index = 0;
            foreach (string location in Properties.Settings.Default.LOCATIONS)
            {
                string[] data = location.Split(';');

                if (data.Count() < 4)
                {
                    MessageBox.Show(string.Format("Could Not Parse {0}...", location), "Invalid Location");
                    continue;
                }

                FileExplorerWindow.UrlLocation urlLocation = new FileExplorerWindow.UrlLocation(data[0], int.Parse(data[1]), data[2], data[3]);

                addItem(urlLocation, -1);
                //index++;
            }

            listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
        }
Exemple #2
0
        public EditScreen(CustomEditorClass customEditorClass, FileExplorerWindow.UrlLocation customClass, int index, string name)
        {
            this.Tag = index;
            //this.customEditorClass = customeditorclass;

            this.customEditorClass = customEditorClass;
            initializeComponent(customEditorClass.customEditor.GetType());

            RegisterEvents();

            SetData(customClass, name);
        }