Ejemplo n.º 1
0
 public CCTVConfigForm(ConfigCCTV config)
 {
     InitializeComponent();
     this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
     Config = config;
     CCTVConfigFormLoad();
 }
Ejemplo n.º 2
0
 private ConfigCCTV ReadSetting(ConfigCCTV config)
 {
     if (config == null)
     {
         config = new ConfigCCTV();
     }
     form = new VTSCore.Layers.Tracks.CCTV.CCTVConfigForm(config.Clone());
     System.Windows.Interop.HwndSource winformWindow = (System.Windows.Interop.HwndSource.FromDependencyObject(this) as System.Windows.Interop.HwndSource);
     if (winformWindow != null)
     {
         new System.Windows.Interop.WindowInteropHelper(form)
         {
             Owner = winformWindow.Handle
         }
     }
     ;
     if (form.ShowDialog().Value)
     {
         return(form.Config);
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 3
0
        void showSettingWindow()
        {
            var config = ReadSetting(_config);

            if (config != null && !config.Equal(_config))
            {
                _config = config;
                ConfigFile <ConfigCCTV> .SaveToFile(ConfigPath, _config);

                updateCCTVInfo();
            }
        }
Ejemplo n.º 4
0
        public CCTVNodeShow(LocatorAndBorder locator)
        {
            _locator    = locator;
            _adjustment = new TrackAdjustment();
            string path = System.IO.Directory.GetParent(System.Windows.Forms.Application.LocalUserAppDataPath).FullName;

            ConfigPath = System.IO.Path.Combine(path, "CCTVConfig.xml");
            _config    = ConfigFile <ConfigCCTV> .FromFile(ConfigPath);

            if (_config != null)
            {
                updateCCTVInfo();
            }
            _locator.OnMapRefreshed       += onMapRefreshed;
            _menuBarsInfo                  = MenuBarsBaseInfo.Instance;
            _menuBarsInfo.PropertyChanged += _menuBarsInfo_PropertyChanged;
        }
Ejemplo n.º 5
0
 public bool Equal(ConfigCCTV cctv)
 {
     return(cctv != null && cctv.Ip == Ip && cctv.Bandwidth == cctv.Bandwidth);
 }