//list of indeces for all select items in Listbox //private int[] listBoxSelectedItems //{ // get // { // try // { // int[] someArray = new int[windowListbox.SelectedItems.Count]; // for (int i = 0; i < windowListbox.SelectedItems.Count; i++) // { // someArray[i] = windowListbox.Items.IndexOf(windowListbox.SelectedItems[i]); // } // return someArray; // } // catch // { // return null; // } // } //} /* ************************************************************************************************************************ *************************************************************************************************************************/ public MainWindow(controllerDelegateContainer editorFunctions, controllerDataDelegateContainer editorDataFunctions, controllerMiscDelegateContainer editorMiscFunctions) { InitializeComponent(); if (editorFunctions == null) { throw new NullReferenceException("MainWindow Constructor cannot have a null references to editorFunctions, editorDataFunctions, or editorMiscFunctions"); } editorFunctions.retrieveDelegates(out contErrorDisplayer, out contProgramCloser); editorDataFunctions.retrieveDelegates(out contDataGetter, out contItemAdder, out contItemEditor); editorMiscFunctions.retrieveDelegates(out contFileOpener, out contNewFileOpener, out contSettingHandler, out contFileSaver, out contGetFolderContents); //windowListbox.ItemsSource = dataView; dataSourceContainer = new List<CollectionView>(); itemEditorDataElement = new xmlElem(); }
/* ************************************************************************************************************************ *************************************************************************************************************************/ protected void showPrimaryWindow() { controllerDelegateContainer tempItem1 = new controllerDelegateContainer(showErrorMessage, closeProgram); controllerDataDelegateContainer tempItem2 = new controllerDataDelegateContainer(selectData, addData, editData); controllerMiscDelegateContainer tempItem3 = new controllerMiscDelegateContainer(openFile, openAnotherFile, setOrGetSetting, saveData, passFolderContents); Double height = Convert.ToDouble(userSettings.getValue(EditorSettings.editingWindowHeight.ToString())); Double width = Convert.ToDouble(userSettings.getValue(EditorSettings.editingWindowWidth.ToString())); baseWindowObject = new MainWindow(tempItem1, tempItem2, tempItem3); try { baseWindowObject.Height = height; baseWindowObject.Width = width; } catch { } baseWindowObject.optionalInitialSetup(); baseWindowObject.Show(); }
//list of indeces for all select items in Listbox //private int[] listBoxSelectedItems //{ // get // { // try // { // int[] someArray = new int[windowListbox.SelectedItems.Count]; // for (int i = 0; i < windowListbox.SelectedItems.Count; i++) // { // someArray[i] = windowListbox.Items.IndexOf(windowListbox.SelectedItems[i]); // } // return someArray; // } // catch // { // return null; // } // } //} /* ************************************************************************************************************************ *************************************************************************************************************************/ public MainWindow(controllerDelegateContainer editorFunctions, controllerDataDelegateContainer editorDataFunctions, controllerMiscDelegateContainer editorMiscFunctions) { InitializeComponent(); if (editorFunctions == null) { throw new NullReferenceException("MainWindow Constructor cannot have a null references to editorFunctions, editorDataFunctions, or editorMiscFunctions"); } editorFunctions.retrieveDelegates(out contErrorDisplayer, out contProgramCloser); editorDataFunctions.retrieveDelegates(out contDataGetter, out contItemAdder, out contItemEditor); editorMiscFunctions.retrieveDelegates(out contFileOpener, out contNewFileOpener, out contSettingHandler, out contFileSaver, out contGetFolderContents); //windowListbox.ItemsSource = dataView; dataSourceContainer = new List <CollectionView>(); itemEditorDataElement = new xmlElem(); }
/* ************************************************************************************************************************ *************************************************************************************************************************/ protected void showPrimaryWindow() { controllerDelegateContainer tempItem1 = new controllerDelegateContainer(showErrorMessage, closeProgram); controllerDataDelegateContainer tempItem2 = new controllerDataDelegateContainer(selectData, addData, editData); controllerMiscDelegateContainer tempItem3 = new controllerMiscDelegateContainer(openFile, openAnotherFile, setOrGetSetting, saveData, passFolderContents); Double height = Convert.ToDouble(userSettings.getValue(EditorSettings.editingWindowHeight.ToString())); Double width = Convert.ToDouble(userSettings.getValue(EditorSettings.editingWindowWidth.ToString())); baseWindowObject = new MainWindow(tempItem1, tempItem2, tempItem3); try { baseWindowObject.Height = height; baseWindowObject.Width = width; } catch { } baseWindowObject.optionalInitialSetup(); baseWindowObject.Show(); }