private void Btn_Datapath_Click(object sender, RoutedEventArgs e) { Window_Datapath window_Datapath = new Window_Datapath(); List <PointData> datapoints = new List <PointData>(); if (window_Datapath.ShowDialog() == true) { try { _dataPath = window_Datapath.GetDataPathModel; //Gets the DataPath Object from the Datapath menu and passes it to _datapath Btn_Component.IsEnabled = true; //Disables the Datapath button and enables the other buttons Btn_Signal.IsEnabled = false; Btn_Datapath.IsEnabled = false; Btn_Copy_Component.IsEnabled = false; GenerateDatapath(_dataPath); //DataPath Code Generation LoadFileTree(_dataPath); //Loads text into the Project file tree view using info in _dataPath LoadCodeTree(_dataPath); //Loads generated code file names into the tree view using the _newfolderPath Canvas canvas = new Canvas(); canvas = this.DrawingCanvas; datapoints = DrawDatapath(_dataPath, canvas); foreach (PointData data in datapoints) { DataPoints.Add(data); } } catch (Exception) { } } }
private void Btn_Datapath_Click(object sender, RoutedEventArgs e) { Window_Datapath window_Datapath = new Window_Datapath(); if (window_Datapath.ShowDialog() == true) { try { DataPath = window_Datapath.GetDataPathModel; Btn_Component.IsEnabled = true; Btn_Signal.IsEnabled = true; Btn_Datapath.IsEnabled = false; //Datapath File Generation GenerateDatapath(DataPath); LoadDataTree(); LoadFileTree(); ///////////////////////////////////Drawing code //RenderDatapath(DataPath); //////////////////////////////////// } catch (Exception) { } } }