private static void SetFilesList(DependencyObject ob, DependencyPropertyChangedEventArgs args) { PanelTC panelObj = ob as PanelTC; string[] tmp = args.NewValue as string[]; string[] display = new string[tmp.Length]; bool addD = false; for (int i = 0; i < tmp.Length; i++) { addD = false; if (tmp[i].Contains("<D>")) { addD = true; } string[] temp = tmp[i].Split('\\'); if (addD) { display[i] = "<D>" + temp[temp.Length - 1]; } else { display[i] = temp[temp.Length - 1]; } } panelObj.itemsList.ItemsSource = display; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainWindow.xaml" ((MiniTC.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.Left = ((MiniTC.PanelTC)(target)); return; case 3: this.Right = ((MiniTC.PanelTC)(target)); return; case 4: #line 23 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Panel = ((MiniTC.PanelTC)(target)); return; case 2: this.Path_tb = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.Drives = ((System.Windows.Controls.ComboBox)(target)); #line 22 "..\..\PanelTC.xaml" this.Drives.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Drives_SelectionChanged); #line default #line hidden return; case 4: this.AvailablePaths_lb = ((System.Windows.Controls.ListBox)(target)); #line 25 "..\..\PanelTC.xaml" this.AvailablePaths_lb.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.AvailablePaths_lb_MouseLeftButtonUp); #line default #line hidden #line 25 "..\..\PanelTC.xaml" this.AvailablePaths_lb.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.AvailablePaths_lb_MouseDoubleClick); #line default #line hidden return; } this._contentLoaded = true; }
private static void SetComboIndex(DependencyObject ob, DependencyPropertyChangedEventArgs args) { PanelTC panelObj = ob as PanelTC; panelObj.allPaths.SelectedIndex = (int)args.NewValue; }
private static void SetDrivesList(DependencyObject ob, DependencyPropertyChangedEventArgs args) { PanelTC panelObj = ob as PanelTC; panelObj.allPaths.ItemsSource = args.NewValue as string[]; }
private static void SetPath(DependencyObject ob, DependencyPropertyChangedEventArgs args) { PanelTC panelObj = ob as PanelTC; panelObj.fullPath.Text = args.NewValue as string; }
private static void SetListIndex(DependencyObject ob, DependencyPropertyChangedEventArgs args) { PanelTC panelObj = ob as PanelTC; panelObj.itemsList.SelectedIndex = (int)args.NewValue; }