예제 #1
0
        public TSIWindow()
        {
            InitializeComponent();

            _selectedSLsDict = new Dictionary<string, IEnumerable<DGObject>>();
            _selectedTunnelsDict = new Dictionary<string, IEnumerable<DGObject>>();
            _slsGrade = new Dictionary<int, int>();
            _slsGraphics = new Dictionary<int, IGraphicCollection>();

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;
            _structureDomain = _prj.getDomain(DomainType.Structure);
            _allSLs = _structureDomain.getObjects("SegmentLining");
            _slLayerIDs = new List<string>();
            foreach (DGObjects objs in _allSLs)
                _slLayerIDs.Add(objs.definition.GISLayerName);

            _allTunnels = _structureDomain.getObjects("Tunnel");
            _tunnelLayerIDs = new List<string>();
            foreach (DGObjects objs in _allTunnels)
                _tunnelLayerIDs.Add(objs.definition.GISLayerName);

            Loaded += TSIWindow_Loaded;
            Unloaded += TSIWindow_Unloaded;
        }
예제 #2
0
 public GameServer(IMainFrame frame, string hostNickName, int maxConnection)
 {
     this.frame         = frame;
     this.hostNickName  = hostNickName;
     this.maxConnection = maxConnection;
     backLog            = maxConnection;
 }
예제 #3
0
        public void Func(string Params)
        {
            //获取数据
            Project   _prj = Globals.project;
            Domain    _constructionDoamin2 = _prj.getDomain("Construction");
            DGObjects _tfsiDGObjects2      = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "TFSI").FirstOrDefault();

            //通知对象组改变事件
            Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent()
            {
                newObjs = _tfsiDGObjects2
            });

            //二维视图改变

            IMainFrame mainFrame = Globals.mainFrame;
            //获取要添加图元的视图view
            IView2D       _inputView       = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D;
            List <string> dynamiclayerlist = new List <string>()
            {
                "TFSI"
            };

            _inputView.Opendynamiclayers(dynamiclayerlist, "地质剖面");
            iS3Legned legeng_SPZL = new iS3Legned()
            {
                legndTitle    = "地质预报图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        colorName = "Green", label = "地质预报", symbolType = SymbolType.Rectangle
                    }
                }
            };

            _inputView.holder.setlegend(legeng_SPZL);
            _inputView.holder.setLegendShow(true);

            _inputView       = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D;
            dynamiclayerlist = new List <string>()
            {
                "TFSI"
            };
            _inputView.Opendynamiclayers(dynamiclayerlist, "地质剖面");
            legeng_SPZL = new iS3Legned()
            {
                legndTitle    = "地质预报图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        colorName = "Green", label = "地质预报", symbolType = SymbolType.Rectangle
                    }
                }
            };
            _inputView.holder.setlegend(legeng_SPZL);
            _inputView.holder.setLegendShow(true);
        }
예제 #4
0
 public DataCatcher(IMainFrame frame, string deviceName, int requestTimeout)
 {
     this.frame          = frame;
     lastRev             = DateTime.Now;
     this.deviceName     = deviceName;
     this.requestTimeout = requestTimeout;
     startDone           = new ManualResetEvent(false);
 }
예제 #5
0
 public static ExtensionManager GetInstance(IMainFrame mainFrame = null)
 {
     if (extensionManager == null)
     {
         extensionManager = new ExtensionManager(mainFrame);
     }
     return(extensionManager);
 }
예제 #6
0
 public GroupChat(IMainFrame frame)
 {
     InitializeComponent();
     sound          = new SoundPlayer(Resources.msg);
     this.frame     = frame;
     appendChatArea = AppendChatArea;
     LoadPhrase();
 }
        private Project _prj; // the project

        #endregion Fields

        #region Constructors

        public MainWindowViewModel()
        {
            _mainFrame = Globals.mainframe;
            _prj = Globals.project;
            Debug.Assert(_mainFrame != null || _prj != null);
            _monDataUtil=new MonitorDataUtil(_prj);
            AllDataUpdateDate = _monDataUtil.groupedDatas.AllTime();
            myAhpIndexsHierarchys.Add(XMLIO.ReadIndexHierarchyXml());//从xml读取指标体系
        }
예제 #8
0
        public void Func(string Params)
        {
            //二维视图改变

            IMainFrame mainFrame            = Globals.mainFrame;
            Project    _prj                 = Globals.project;
            Domain     _constructionDoamin2 = _prj.getDomain("Construction");
            DGObjects  _gprfDGObjects2      = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "TFSI").FirstOrDefault();

            Globals.mainFrame.DGObjectsSelectionChangedListener(null, new DGObjectsSelectionChangedEvent()
            {
                newObjs = _gprfDGObjects2
            });

            //获取要添加图元的视图view
            IView2D       _inputView       = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D;
            List <string> dynamiclayerlist = new List <string>()
            {
                "RiskIdfy"
            };

            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            iS3Legned legeng_risk = new iS3Legned()
            {
                legndTitle    = "风险标识",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        label = "风险点", symbolType = SymbolType.Icon, refPath = "riskidfy_alert.png"
                    }
                }
            };

            _inputView.holder.setlegend(legeng_risk);
            _inputView.holder.setLegendShow(true);

            _inputView       = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D;
            dynamiclayerlist = new List <string>()
            {
                "RiskIdfy"
            };
            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            legeng_risk = new iS3Legned()
            {
                legndTitle    = "风险标识",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        label = "风险点", symbolType = SymbolType.Icon, refPath = "riskidfy_alert.png"
                    }
                }
            };
            _inputView.holder.setlegend(legeng_risk);
            _inputView.holder.setLegendShow(true);
        }
예제 #9
0
        public static void Initialize(
            IMainFrame applicationToolbar,
            IApplicationResources resources,
            IApplicationStateService stateService,
            IEventAggregator eventAggregator)
        {
            eventAggregator.GetEvent <ApplicationStateChangeEvent>().Subscribe(
                (e) => applicationToolbar.SetMenuItems(GetItems(resources, stateService)));

            applicationToolbar.SetMenuItems(GetItems(resources, stateService));
        }
예제 #10
0
 public MenuHandler(
     IMainMenu mainMenu,
     IMainFrame mainFrame,
     IOptionsFrame optionsFrame,
     IStatusFrame playerStatusFrame,
     IStatusFrame monsterStatusFrame)
 {
     this.mainMenu           = mainMenu;
     this.mainFrame          = mainFrame;
     this.optionsFrame       = optionsFrame;
     this.playerStatusFrame  = playerStatusFrame;
     this.monsterStatusFrame = monsterStatusFrame;
 }
        Project _prj; // the project

        #endregion Fields

        #region Constructors

        public DataManage()
        {
            _allIndexDataDic = new Dictionary<string, List<DGObject>>();
            _prj = Globals.project;
            _mainFrame = Globals.mainframe;
            if(_prj==null||_mainFrame==null)
            {
                return;//no data;
            }
            var _monDomain = _prj.getDomain(DomainType.Monitoring);
            _monGroup = _monDomain.getObjects("MonGroup").merge();
            _monPoint = _monDomain.getObjects("MonPoint").merge();
            GetAllIndexData();
        }
        public DemoWindow()
        {
            InitializeComponent();

            //Initialize global variables
            _prj = Globals.project;
            _monitoringDomain = _prj.getDomain(DomainType.Monitoring);
            _allMPs           = _monitoringDomain.getObjects("MonPoint");
            _mps       = _allMPs.merge();
            _mainFrame = Globals.mainframe;
            _monpoints = new Dictionary <string, IEnumerable <DGObject> >();
            mptb       = 0.002;

            Loaded += DemoWindow_Loaded1;
            getresult();
        }
예제 #13
0
        public static void Initialize(
            IMainFrame applicationToolbar,
            IApplicationResources resources,
            IApplicationStateService stateService,
            ISettingsService settingsService,
            IEventAggregator eventAggregator)
        {
            eventAggregator.GetEvent <ApplicationStateChangeEvent>().Subscribe(
                (e) => applicationToolbar.SetMenuItems(GetItems(resources, stateService, settingsService)));

            eventAggregator.GetEvent <SettingsChangeEvent>()
            .Where(x => string.Equals(x.Key, GoogleMusicCoreSettingsServiceExtensions.IsAllAccessAvailableKey, StringComparison.OrdinalIgnoreCase))
            .Subscribe(
                (e) => applicationToolbar.SetMenuItems(GetItems(resources, stateService, settingsService)));

            applicationToolbar.SetMenuItems(GetItems(resources, stateService, settingsService));
        }
예제 #14
0
        Dictionary <int, IGraphicCollection> _MonGraphics; //分析结果存储

        public void initial()
        {
            //初始化全局变量
            _selectedMonsDict = new Dictionary <string, IEnumerable <DGObject> >();
            _MonGrade         = new Dictionary <int, int>();
            _MonGraphics      = new Dictionary <int, IGraphicCollection>();

            _mainFrame     = Globals.mainframe;
            _prj           = Globals.project;
            _MonitorDomain = _prj.getDomain(DomainType.Monitoring);
            _allMons       = _MonitorDomain.getObjects("MonPoint");
            _monLayerIDs   = new List <string>();
            foreach (DGObjects objs in _allMons)
            {
                _monLayerIDs.Add(objs.definition.GISLayerName);
            }

            Loaded   += MonitorDemoTool_Loaded;
            Unloaded += MonitorDemoTool_Unloaded;
        }
예제 #15
0
        static void Main()
        {
            //创建苹果电脑工厂
            IComputerFactory MyAppleFactory = new AppleComputerFactory();

            //生产出苹果显示器
            IDisplay AppleDisplay = MyAppleFactory.ProduceADisplay();

            AppleDisplay.Show();


            //创建戴尔电脑工厂
            IComputerFactory MyDellFactory = new DellComputerFactory();

            //生产出戴尔主机
            IMainFrame DellMainFrame = MyDellFactory.ProduceAMainFrame();

            DellMainFrame.Open();


            Console.Read();
        }
예제 #16
0
        public void Func(string Params)
        {
            //通知对象组改变事件
            Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent()
            {
                newObjs = null
            });
            //二维视图改变

            IMainFrame mainFrame = Globals.mainFrame;
            //获取要添加图元的视图view
            IView2D       _inputView       = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D;
            List <string> dynamiclayerlist = new List <string>();

            _inputView.Opendynamiclayers(dynamiclayerlist, "物探");
            _inputView.holder.setLegendShow(false);

            _inputView       = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D;
            dynamiclayerlist = new List <string>();
            _inputView.Opendynamiclayers(dynamiclayerlist, "物探");
            _inputView.holder.setLegendShow(false);
        }
예제 #17
0
        Dictionary <int, IGraphicCollection> _slsGraphics; //图形结果存储

        public DemoWindow()
        {
            InitializeComponent();

            //初始化全局变量
            _selectedSLsDict = new Dictionary <string, IEnumerable <DGObject> >();
            _slsGrade        = new Dictionary <int, int>();
            _slsGraphics     = new Dictionary <int, IGraphicCollection>();

            _mainFrame       = Globals.mainframe;
            _prj             = Globals.project;
            _structureDomain = _prj.getDomain(DomainType.Structure);
            _allSLs          = _structureDomain.getObjects("SegmentLining");
            _slLayerIDs      = new List <string>();
            foreach (DGObjects objs in _allSLs)
            {
                _slLayerIDs.Add(objs.definition.GISLayerName);
            }

            //窗口加载、关闭事件
            Loaded   += DemoWindow_Loaded;
            Unloaded += DemoWindow_Unloaded;
        }
예제 #18
0
 public void SetMainFrame(IMainFrame MainFrame)
 {
     this.myMainFrame = MainFrame;
 }
예제 #19
0
 private ExtensionManager(IMainFrame mainFrame)
 {
     _mainFrame = mainFrame == null ? _mainFrame : mainFrame;
 }
예제 #20
0
 public GameServer(IMainFrame frame, string hostNickName)
 {
     this.frame        = frame;
     this.hostNickName = hostNickName;
 }
예제 #21
0
        public void Func(string Params)
        {
            //初始化三维事件
            U3DViewModel  model  = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel;
            SetPointEvent _event = new SetPointEvent(UnityEventType.SetPointEvent);

            _event.Domain  = "Construction";
            _event.state   = state;
            state          = !state;
            _event.ObjType = "CHAG";
            //获取数据
            Project   _prj = Globals.project;
            Domain    _constructionDoamin2 = _prj.getDomain("Construction");
            DGObjects _gprfDGObjects2      = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "CHAG").FirstOrDefault();

            foreach (DGObject obj in _gprfDGObjects2.objContainer)
            {
                try
                {
                    CHAG chag = JsonConvert.DeserializeObject <CHAG>(JsonConvert.SerializeObject(obj));
                    if ((chag.CHAG_CHAI == null) || (chag.CHAG_CHAI.Length == 0))
                    {
                        continue;
                    }
                    _event.TunnelPointList.Add(chag.CHAG_CHAI.Split('-')[0] + "#" + chag.ID.ToString());
                    int before = findNum(chag.CHAG_PRIM);     //原来的衬砌类型
                    int after  = findNum(chag.CHAG_PRES);
                    if (before == after)
                    {
                        _event.ImageList.Add("Panel_Keep");
                    }
                    if (before > after)
                    {
                        _event.ImageList.Add("Panel_Decrease");
                    }
                    if (before < after)
                    {
                        _event.ImageList.Add("Panel_Increase");
                    }
                }
                catch (Exception ex)
                {
                }
            }
            model.ExcuteCommand(JsonConvert.SerializeObject(_event));
            //通知对象组改变事件
            Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent()
            {
                newObjs = _gprfDGObjects2
            });
            //二维视图改变

            IMainFrame mainFrame = Globals.mainFrame;
            //获取要添加图元的视图view 右幅
            IView2D       _inputView       = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D;
            List <string> dynamiclayerlist = new List <string>()
            {
                "CHAG"
            };

            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            iS3Legned legeng_CHAG = new iS3Legned()
            {
                legndTitle    = "施工变更图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        colorName = "HotPink", label = "施工变更", symbolType = SymbolType.Rectangle
                    }
                }
            };

            _inputView.holder.setlegend(legeng_CHAG);
            _inputView.holder.setLegendShow(true);

            //左幅
            _inputView       = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D;
            dynamiclayerlist = new List <string>()
            {
                "CHAG"
            };
            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            legeng_CHAG = new iS3Legned()
            {
                legndTitle    = "施工变更图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        colorName = "HotPink", label = "施工变更", symbolType = SymbolType.Rectangle
                    }
                }
            };
            _inputView.holder.setlegend(legeng_CHAG);

            _inputView.holder.setLegendShow(true);
        }
        public LoadStructureModelWindow()
        {
            InitializeComponent();

            ISimpleLineSymbol outline = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _whitefillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.White, SimpleFillStyle.Solid, outline);
            _lineSymbol = Runtime.graphicEngine.newSimpleLineSymbol(
                                Color.FromArgb(255, 0, 0, 0), Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _arrowFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.Blue, SimpleFillStyle.Solid, outline);

            SLMomentGraphics = new Dictionary<int, IGraphicCollection>();
            SLAxialGraphics = new Dictionary<int, IGraphicCollection>();
            SLShearGraphics = new Dictionary<int, IGraphicCollection>();
            SLDisplacementGraphics = new Dictionary<int, IGraphicCollection>();

            _loadStructure = new LoadStructure();

            Loaded += LoadStructureModelWindow_Loaded;
            Unloaded += LoadStructureModelWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_structureDomain == null) { _initFailed = true; return; }
            _geologyDomain = _prj.getDomain(DomainType.Geology);
            if (_geologyDomain == null) { _initFailed = true; return; }

            _allSLs = _structureDomain.getObjects("SegmentLining");
            _slLayerIDs = new List<string>();
            foreach (DGObjects objs in _allSLs)
                _slLayerIDs.Add(objs.definition.GISLayerName);

            _ansysPath = Runtime.rootPath + "//Conf//ansysPath.xml";
        }
예제 #23
0
 public ClientFrame(IMainFrame frame)
 {
     InitializeComponent();
     this.frame = frame;
     InitUI();
 }
예제 #24
0
        public void Func(string Params)
        {
            //初始化三维事件
            U3DViewModel  model  = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel;
            SetPointEvent _event = new SetPointEvent(UnityEventType.SetPointEvent);

            _event.Domain  = "Construction";
            _event.ObjType = "TPZL";
            _event.state   = state;
            state          = !state;
            //获取数据
            Project   _prj = Globals.project;
            Domain    _constructionDoamin2 = _prj.getDomain("Construction");
            DGObjects _gprfDGObjects2      = _constructionDoamin2.DGObjectsList.Where(x => x.definition.Type == "TPZL").FirstOrDefault();

            foreach (DGObject obj in _gprfDGObjects2.objContainer)
            {
                TPZL tpzl = JsonConvert.DeserializeObject <TPZL>(JsonConvert.SerializeObject(obj));
                if ((tpzl.TPZL_ZHQJ == null) || (tpzl.TPZL_ZHQJ.Length == 0))
                {
                    continue;
                }
                _event.TunnelPointList.Add(tpzl.TPZL_ZHQJ.Split('-')[0] + "#" + tpzl.ID.ToString());
                _event.ImageList.Add("Panel_Image");
            }
            model.ExcuteCommand(JsonConvert.SerializeObject(_event));
            //通知对象组改变事件
            Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent()
            {
                newObjs = _gprfDGObjects2
            });

            IMainFrame mainFrame = Globals.mainFrame;
            //获取要添加图元的视图view
            IView2D       _inputView       = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D;
            List <string> dynamiclayerlist = new List <string>()
            {
                "TPZL"
            };

            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            iS3Legned legeng_TPZL = new iS3Legned()
            {
                legndTitle    = "图片资料图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        label = "图片资料", symbolType = SymbolType.Icon, refPath = "picicon.png"
                    }
                }
            };

            _inputView.holder.setlegend(legeng_TPZL);
            _inputView.holder.setLegendShow(true);

            _inputView       = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D;
            dynamiclayerlist = new List <string>()
            {
                "TPZL"
            };
            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            legeng_TPZL = new iS3Legned()
            {
                legndTitle    = "图片资料图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        label = "图片资料", symbolType = SymbolType.Icon, refPath = "picicon.png"
                    }
                }
            };
            _inputView.holder.setlegend(legeng_TPZL);
            _inputView.holder.setLegendShow(true);
        }
예제 #25
0
        public DrawTunnelsWindow()
        {
            InitializeComponent();

            //Initialize
            ISimpleLineSymbol linesymbol = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Red, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _symbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.Blue, SimpleFillStyle.Solid, linesymbol);
            _tunnelsGraphics = new Dictionary<int, IGraphicCollection>();
            _selectedTunnelsDict = new Dictionary<string, IEnumerable<DGObject>>();
            _lpResults = new List<DGObject>();

            _settings = new DrawTunnelsSettings();
            SettingsHolder.DataContext = _settings;
            Loaded += DrawTunnelsWindow_Loaded;
            Unloaded += DrawTunnelsWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_structureDomain == null) { _initFailed = true; return; }

            _allTunnels = _structureDomain.getObjects("Tunnel");
            _tunnelLayerIDs = new HashSet<string>();
            foreach (DGObjects objs in _allTunnels)
                _tunnelLayerIDs.Add(objs.definition.GISLayerName);

            _allAxes = _structureDomain.getObjects("TunnelAxis");
            if (_allAxes == null) { _initFailed = true; return; }
        }
예제 #26
0
 public GameClient(IMainFrame frame, bool isUdp)
 {
     this.frame = frame;
     this.isUdp = isUdp;
 }
예제 #27
0
        Domain _structureDomain; // the structure domain of the project

        #endregion Fields

        #region Constructors

        public TunnelCSLoadWindow()
        {
            InitializeComponent();

            ISimpleLineSymbol outline = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _fillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.Cyan, SimpleFillStyle.Solid, outline);
            _lineSymbol = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Blue, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _arrowFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Colors.Blue, SimpleFillStyle.Solid, outline);
            _IniStress = new SoilInitalStress();
            _slsGraphics = new Dictionary<string, IGraphicCollection>();

            Loaded += TunnelCSLoadWindow_Loaded;
            Unloaded += TunnelCSLoadWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_structureDomain == null) { _initFailed = true; return; }
            _geologyDomain = _prj.getDomain(DomainType.Geology);
            if (_geologyDomain == null) { _initFailed = true; return; }

            _allSLs = _structureDomain.getObjects("SegmentLining");
            _slLayerIDs = new List<string>();
            foreach (DGObjects objs in _allSLs)
                _slLayerIDs.Add(objs.definition.GISLayerName);
        }
        HashSet<string> _tunnelLayerIDs; // tunnel layer IDs

        #endregion Fields

        #region Constructors

        public TunnelDepthAnalysisWindow()
        {
            InitializeComponent();

            //Initialize
            _linesymbol = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Blue, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _selectedTunnelsDict = new Dictionary<string, IEnumerable<DGObject>>();
            _depthGraphics = new Dictionary<int, IGraphicCollection>();

            Loaded += TunnelDepthAnalysisWindow_Loaded;
            Unloaded += TunnelDepthAnalysisWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_structureDomain == null) { _initFailed = true; return; }

            _allTunnels = _structureDomain.getObjects("Tunnel");
            _tunnelLayerIDs = new HashSet<string>();
            foreach (DGObjects objs in _allTunnels)
                _tunnelLayerIDs.Add(objs.definition.GISLayerName);
        }
        public Einstellungen()
        {
            MainFrame = MainWindow.Me;
            InitializeComponent();
            checkBox.IsChecked    = MainFrame.IsSnowing(); //Kann Ab januar Deaktiviert WERDEN! NEIN!
            button3.ToolTip       = "Hier findest du eine Anleitung,\nwie dieses Programm zu nutzen ist";
            textBox_Copy6.ToolTip = "Weitere Beispiele:\n6h und 10 min = 6,1 oder 6,10\n7h = 7 oder 7,0 oder 7,00";

            TCList.ItemsSource = CreateTCList();
            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(TCList.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("Fenster");

            view.GroupDescriptions.Add(groupDescription);

            if (checkBox.IsChecked == true)
            {
                label2_Copy.IsEnabled = false;
                comboBox.IsEnabled    = false;
            }
            else
            {
                checkBox.IsChecked    = false;
                label2_Copy.IsEnabled = true;
                comboBox.IsEnabled    = true;
            }

            Oeffnet();
            ls = new List <DefaultWerte>();
            xs = new XmlSerializer(typeof(List <DefaultWerte>));
            try
            {
                FileStream fr = new FileStream(path, FileMode.Open, FileAccess.Read);
                ls = (List <DefaultWerte>)xs.Deserialize(fr);
                int i = ls.Count;
                i                  = i - 1;
                textBox.Text       = ls[i].ZeitGuthaben;
                textBox_Copy.Text  = ls[i].GekommenH;
                textBox_Copy1.Text = ls[i].GekommenM;
                textBox_Copy2.Text = ls[i].Pause;
                textBox_Copy3.Text = ls[i].WillGehenH;
                textBox_Copy4.Text = ls[i].WillGehenM;
                textBox_Copy5.Text = ls[i].Wunschfaktor;
                textBox_Copy6.Text = ls[i].WunschAStunden;

                if (textBox_Copy6.Text == "")
                {
                    textBox_Copy6.Text = "8";
                }
                if (ls[i].Winter == "True")
                {
                    checkBox.IsChecked = true;
                }
                else
                {
                    checkBox.IsChecked = false;
                }

                if (ls[i].BackColor == "WhiteB")
                {
                    comboBox.SelectedItem = WhiteB;
                }
                else if (ls[i].BackColor == "DarkGrayB")
                {
                    comboBox.SelectedItem = DarkGrayB;
                }
                else if (ls[i].BackColor == "GreenB")
                {
                    comboBox.SelectedItem = GreenB;
                }
                else if (ls[i].BackColor == "LightBlueB")
                {
                    comboBox.SelectedItem = LightBlueB;
                }
                else if (ls[i].BackColor == "RosaB")
                {
                    comboBox.SelectedItem = RosaB;
                }
                else if (ls[i].BackColor == "LightCoralB")
                {
                    comboBox.SelectedItem = LightCoralB;
                }
                else if (ls[i].BackColor == "LightYellowB")
                {
                    comboBox.SelectedItem = LightYellowB;
                }
                else if (ls[i].BackColor == "BlackB")
                {
                    comboBox.SelectedItem = BlackB;
                }
                else if (ls[i].BackColor == "RealBlackB")
                {
                    comboBox.SelectedItem = RealBlackB;
                }
                else if (ls[i].BackColor == "BuntB")
                {
                    comboBox.SelectedItem = BuntB;
                }

                if (ls[i].Modus == "True")
                {
                    radioButton.IsChecked = true;
                }
                else if (ls[i].Modus == "False")
                {
                    radioButton_Copy.IsChecked = true;
                }
                else
                {
                    radioButton_Copy.IsChecked = true;
                }

                fr.Close();
            }
            catch (Exception ex)
            {
                //    comboBox.SelectedItem = LightCoralB; //auf weiß ändern im januar
                comboBox.SelectedItem      = WhiteB; //auf weiß ändern im januar
                radioButton_Copy.IsChecked = true;
            }
        }
        List<string> _tunnelLayerIDs; // tunnel layer IDs

        #endregion Fields

        #region Constructors

        public SimpleProfileAnalysisWindow()
        {
            InitializeComponent();

            _settings = new GeoProjSettings();
            SettingsHolder.DataContext = _settings;
            Loaded += SimpleProfileAnalysisWindow_Loaded;
            Unloaded += SimpleProfileAnalysisWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _geologyDomain = _prj.getDomain(DomainType.Geology);
            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_geologyDomain == null || _structureDomain == null) { _initFailed = true; return; }

            // set the input view
            _inputView = _mainFrame.activeView;
            if (_inputView == null ||
                _inputView.eMap.MapType != EngineeringMapType.FootPrintMap)
                _inputView = _mainFrame.views.FirstOrDefault(
                    x => x.eMap.MapType == EngineeringMapType.FootPrintMap);
            if (_inputView == null) { _initFailed = true; return; }
            InputViewTB.DataContext = _inputView;

            _allBhs = _geologyDomain.getObjects("Borehole");
            _allSts = _geologyDomain.getObjects("Stratum");
            _bhLayerIDs = new List<string>();
            foreach (DGObjects objs in _allBhs)
                _bhLayerIDs.Add(objs.definition.GISLayerName);

            _allTunnels = _structureDomain.getObjects("Tunnel");
            _tunnelLayerIDs = new List<string>();
            foreach (DGObjects objs in _allTunnels)
                _tunnelLayerIDs.Add(objs.definition.GISLayerName);

            // add borehole layer as selectable layer
            _inputView.removeSelectableLayer("_ALL");
            _inputView.addSeletableLayer("0");     // "0" is the drawing layer ID
            foreach (string layerID in _bhLayerIDs)
                _inputView.addSeletableLayer(layerID);
            foreach (string layerID in _tunnelLayerIDs)
                _inputView.addSeletableLayer(layerID);

            // add a listener to object selection changed event
            _inputView.objSelectionChangedTrigger +=
                _inputView_objSelectionChangedListener;
            // add a listener to drawing graphics changed event
            _inputView.drawingGraphicsChangedTrigger +=
                _inputView_drawingGraphicsChangedListener;
        }
예제 #31
0
        public DrawSLWindow()
        {
            InitializeComponent();

            //Initialize
            ISimpleLineSymbol linesymbol = Runtime.graphicEngine.newSimpleLineSymbol(
                                Colors.Black, Core.Graphics.SimpleLineStyle.Solid, 1.0);
            _fillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Color.FromArgb(150, 0, 0, 255), SimpleFillStyle.Solid, linesymbol);
            _whiteFillSymbol = Runtime.graphicEngine.newSimpleFillSymbol(
                                Color.FromArgb(150, 255, 255, 255), SimpleFillStyle.Solid, linesymbol);
            _selectedSLsDict = new Dictionary<string, IEnumerable<DGObject>>();
            _slsGraphics = new Dictionary<int, IGraphicCollection>();
            _lsGraphics = new Dictionary<string, LSGraphics>();
            _csGraphics = new Dictionary<string, CSGraphics>();

            Loaded += DrawSLWindow_Loaded;
            Unloaded += DrawSLWindow_Unloaded;

            _mainFrame = Globals.mainframe;
            _prj = Globals.project;

            if (_mainFrame == null || _prj == null) { _initFailed = true; return; }

            _structureDomain = _prj.getDomain(DomainType.Structure);
            if (_structureDomain == null) { _initFailed = true; return; }

            _allSLs = _structureDomain.getObjects("SegmentLining");
            _slLayerIDs = new List<string>();
            foreach (DGObjects objs in _allSLs)
                _slLayerIDs.Add(objs.definition.GISLayerName);
        }
예제 #32
0
        public MainWindow()
        {
            if (!Directory.Exists("C:\\temp\\"))
            {
                Directory.CreateDirectory("C:\\temp\\");
            }

            Me = this;
            InitializeComponent();
            ls = new List <DefaultWerte>();
            xs = new XmlSerializer(typeof(List <DefaultWerte>));
            String.Format("{0:dddd dd MMM YY HH mm}", d);
            string Tag;

            if (d.DayOfWeek.ToString() == "Monday")
            {
                Tag = "Montag";
            }
            else if (d.DayOfWeek.ToString() == "Tuesday")
            {
                Tag = "Dienstag";
            }
            else if (d.DayOfWeek.ToString() == "Wednesday")
            {
                Tag = "Mittwoch";
            }
            else if (d.DayOfWeek.ToString() == "Thursday")
            {
                Tag = "Donnerstag";
            }
            else if (d.DayOfWeek.ToString() == "Friday")
            {
                Tag = "Freitag";
            }
            else if (d.DayOfWeek.ToString() == "Saturday")
            {
                Tag = "Samstag";
            }
            else if (d.DayOfWeek.ToString() == "Sunday")
            {
                Tag = "Sonntag";
            }
            else
            {
                Tag = d.DayOfWeek.ToString();
            }

            textBox161.Text = Tag + ", " + d.ToString();

            try
            {
                FileStream fr = new FileStream(Einstellungen.path, FileMode.OpenOrCreate, FileAccess.Read);
                ls = (List <DefaultWerte>)xs.Deserialize(fr);
                int i = ls.Count;
                i                   = i - 1;
                textBox1.Text       = ls[i].ZeitGuthaben;
                textBox2.Text       = ls[i].GekommenH;
                textBox3.Text       = ls[i].GekommenM;
                textBox4.Text       = ls[i].Pause;
                textBox5.Text       = ls[i].WillGehenH;
                textBox6.Text       = ls[i].WillGehenM;
                textBox5_Copy1.Text = ls[i].Wunschfaktor;
                textBox5_Copy.Text  = ls[i].WunschAStunden;

                if (textBox5_Copy.Text == "")
                {
                    textBox5_Copy.Text = "8";
                }
                if (ls[i].Winter == "True")
                {
                    StartSnow();
                    winter = true;
                }

                if (ls[i].BackColor == "WhiteB")
                {
                    Background = Brushes.White;
                }
                else if (ls[i].BackColor == "DarkGrayB")
                {
                    Background         = Brushes.LightGray;
                    button.Background  = Brushes.White;
                    button1.Background = Brushes.White;
                    button2.Background = Brushes.White;
                }
                else if (ls[i].BackColor == "GreenB")
                {
                    Background = Brushes.LightGreen;
                }
                else if (ls[i].BackColor == "LightBlueB")
                {
                    Background = Brushes.LightBlue;
                }
                else if (ls[i].BackColor == "RosaB")
                {
                    Background = Brushes.Pink;
                }
                else if (ls[i].BackColor == "LightCoralB")
                {
                    Background = Brushes.LightCoral;
                }
                else if (ls[i].BackColor == "LightYellowB")
                {
                    Background = Brushes.LightGoldenrodYellow;
                }
                else if (ls[i].BackColor == "BlackB")
                {
                    Background              = Brushes.DimGray;
                    label10.Foreground      = Brushes.Beige;
                    label11.Foreground      = Brushes.Beige;
                    label2.Foreground       = Brushes.Beige;
                    label3.Foreground       = Brushes.Beige;
                    label4.Foreground       = Brushes.Beige;
                    label5.Foreground       = Brushes.Beige;
                    label6.Foreground       = Brushes.Beige;
                    label7.Foreground       = Brushes.Beige;
                    label8.Foreground       = Brushes.Beige;
                    label9.Foreground       = Brushes.Beige;
                    label99.Foreground      = Brushes.Beige;
                    label9_Copy.Foreground  = Brushes.Beige;
                    label9_Copy1.Foreground = Brushes.Beige;
                    label9_Copy2.Foreground = Brushes.Beige;
                    label9_Copy3.Foreground = Brushes.Beige;
                    label9_Copy4.Foreground = Brushes.Beige;
                    Boarder1.BorderBrush    = Brushes.Beige;
                    Boarder2.BorderBrush    = Brushes.Beige;
                    button.Background       = Brushes.White;
                    button1.Background      = Brushes.White;
                    button2.Background      = Brushes.White;
                    textBox161.Foreground   = Brushes.Beige;
                    label3_Copy.Foreground  = Brushes.Beige;
                    label5_Copy1.Foreground = Brushes.Beige;
                }
                else if (ls[i].BackColor == "RealBlackB")
                {
                    Background              = Brushes.Black;
                    label10.Foreground      = Brushes.Beige;
                    label11.Foreground      = Brushes.Beige;
                    label2.Foreground       = Brushes.Beige;
                    label3.Foreground       = Brushes.Beige;
                    label4.Foreground       = Brushes.Beige;
                    label5.Foreground       = Brushes.Beige;
                    label6.Foreground       = Brushes.Beige;
                    label7.Foreground       = Brushes.Beige;
                    label8.Foreground       = Brushes.Beige;
                    label9.Foreground       = Brushes.Beige;
                    label99.Foreground      = Brushes.Beige;
                    label9_Copy.Foreground  = Brushes.Beige;
                    label9_Copy1.Foreground = Brushes.Beige;
                    label9_Copy2.Foreground = Brushes.Beige;
                    label9_Copy3.Foreground = Brushes.Beige;
                    label9_Copy4.Foreground = Brushes.Beige;
                    Boarder1.BorderBrush    = Brushes.Beige;
                    Boarder2.BorderBrush    = Brushes.Beige;
                    button.Background       = Brushes.White;
                    button1.Background      = Brushes.White;
                    button2.Background      = Brushes.White;
                    textBox161.Foreground   = Brushes.Beige;
                    label3_Copy.Foreground  = Brushes.Beige;
                    label5_Copy1.Foreground = Brushes.Beige;
                }
                else if (ls[i].BackColor == "BuntB")
                {
                    linebrush.StartPoint = new Point(0, 0);
                    linebrush.EndPoint   = new Point(0, 1);
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.Yellow, 0.0));
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.Red, 0.25));
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.Blue, 0.75));
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.LimeGreen, 1.0));
                    Background = linebrush;
                }

                if (ls[i].Modus == "True")
                {
                    label5.Content      = "Zeitguthaben wie angegeben (zb. 1,93 oder -0,83)";
                    label5.ToolTip      = "= Faktor, wie im inesCRM unter 'Tagespräsenzzeiten' -> 'GL-Saldo std.' angegeben";
                    label3_Copy.Content = "[Modus: Faktor | Alt]";
                    _Modus = 0;
                }
                else if (ls[i].Modus == "False")
                {
                    label5.Content       = "Zeitguthaben mit Komma getrennt";
                    label5_Copy1.Content = "(zb. 2:03 = 2,03 oder -1:87 = -1,87)";
                    label5.ToolTip       = "= Überstunden, wie im Vertec unter\n'Übersicht Leistungen' -> 'Überzeitsaldo (exkl. Heute) angegeben'";
                    label3_Copy.Content  = "[Modus: Uhrzeit | Neu]";
                    _Modus = 1;
                }
                else
                {
                    label5.Content       = "Zeitguthaben mit Komma getrennt";
                    label5_Copy1.Content = "(zb. 2:03 = 2,03 oder -1:87 = -1,87)";
                    label5.ToolTip       = "= Überstunden, wie im Vertec unter\n'Übersicht Leistungen' -> 'Überzeitsaldo (exkl. Heute) angegeben'";
                    label3_Copy.Content  = "[Modus: Uhrzeit | Neu]";
                    _Modus = 1;
                }

                fr.Close();
            }
            catch (Exception ex)
            {
                textBox1.Text       = "0,00";
                textBox2.Text       = "08";
                textBox3.Text       = "00";
                textBox4.Text       = "30";
                textBox5.Text       = "17";
                textBox6.Text       = "00";
                textBox5_Copy1.Text = "2,5";
                textBox5_Copy.Text  = "8";

                label5.Content       = "Zeitguthaben mit Komma getrennt";
                label5_Copy1.Content = "(zb. 2:03 = 2,03 oder -1:87 = -1,87)";
                label5.ToolTip       = "= Überstunden, wie im Vertec unter\n'Übersicht Leistungen' -> 'Überzeitsaldo (exkl. Heute) angegeben'";
                label3_Copy.Content  = "[Modus: Uhrzeit | Neu]";
                _Modus = 1;
                // StartSnow(); //Kann Ab januar Deaktiviert WERDEN!
            }
            textBox1.Focus();
            textBox1.SelectAll();

            if (Background != Brushes.LightCoral && winter == true)
            {
                MessageBox.Show("Glückwunsch!\n\nNun gibt es 2 Möglichkeiten, wie du auf dieses EasterEgg gekommen bist.\n1.: Ein Bug, den ich noch nicht erkannt habe, oder\n2.: Du hast tatsächlich den Wintermodus drin gehabt und wolltest eine andere Hintergrundfarbe und hattest die schlaue Idee, in der .XML-Datei einfach die Farbe zu ändern. \n\nSolltest du es nur durch zufall bekommen haben, schreib mir bitte eine EMail, ansonsten Hut ab ;) und einen schönen " + Tag + " dir.", "EasterEgg");
            }
        }
예제 #33
0
 public GameClient(IMainFrame frame)
 {
     this.frame = frame;
 }
예제 #34
0
        public MainWindow()
        {
            Me = this;
            InitializeComponent();
            ls = new List <DefaultWerte>();
            xs = new XmlSerializer(typeof(List <DefaultWerte>));
            try
            {
                FileStream fr = new FileStream(Einstellungen.path, FileMode.OpenOrCreate, FileAccess.Read);
                ls = (List <DefaultWerte>)xs.Deserialize(fr);
                int i = ls.Count;
                i                   = i - 1;
                textBox1.Text       = ls[i].ZeitGuthaben;
                textBox2.Text       = ls[i].GekommenH;
                textBox3.Text       = ls[i].GekommenM;
                textBox4.Text       = ls[i].Pause;
                textBox5.Text       = ls[i].WillGehenH;
                textBox6.Text       = ls[i].WillGehenM;
                textBox5_Copy1.Text = ls[i].Wunschfaktor;
                if (ls[i].Winter == "True")
                {
                    StartSnow();
                }

                if (ls[i].BackColor == "WhiteB")
                {
                    Background = Brushes.White;
                }
                else if (ls[i].BackColor == "DarkGrayB")
                {
                    Background         = Brushes.LightGray;
                    button.Background  = Brushes.White;
                    button1.Background = Brushes.White;
                    button2.Background = Brushes.White;
                }
                else if (ls[i].BackColor == "GreenB")
                {
                    Background = Brushes.LightGreen;
                }
                else if (ls[i].BackColor == "LightBlueB")
                {
                    Background = Brushes.LightBlue;
                }
                else if (ls[i].BackColor == "RosaB")
                {
                    Background = Brushes.Pink;
                }
                else if (ls[i].BackColor == "LightCoralB")
                {
                    Background = Brushes.LightCoral;
                }
                else if (ls[i].BackColor == "LightYellowB")
                {
                    Background = Brushes.LightGoldenrodYellow;
                }
                else if (ls[i].BackColor == "BlackB")
                {
                    Background              = Brushes.DimGray;
                    label10.Foreground      = Brushes.Beige;
                    label11.Foreground      = Brushes.Beige;
                    label2.Foreground       = Brushes.Beige;
                    label3.Foreground       = Brushes.Beige;
                    label4.Foreground       = Brushes.Beige;
                    label5.Foreground       = Brushes.Beige;
                    label6.Foreground       = Brushes.Beige;
                    label7.Foreground       = Brushes.Beige;
                    label8.Foreground       = Brushes.Beige;
                    label9.Foreground       = Brushes.Beige;
                    label99.Foreground      = Brushes.Beige;
                    label9_Copy.Foreground  = Brushes.Beige;
                    label9_Copy1.Foreground = Brushes.Beige;
                    label9_Copy2.Foreground = Brushes.Beige;
                    Boarder1.BorderBrush    = Brushes.Beige;
                    Boarder2.BorderBrush    = Brushes.Beige;
                    button.Background       = Brushes.White;
                    button1.Background      = Brushes.White;
                    button2.Background      = Brushes.White;
                }
                else if (ls[i].BackColor == "RealBlackB")
                {
                    Background              = Brushes.Black;
                    label10.Foreground      = Brushes.Beige;
                    label11.Foreground      = Brushes.Beige;
                    label2.Foreground       = Brushes.Beige;
                    label3.Foreground       = Brushes.Beige;
                    label4.Foreground       = Brushes.Beige;
                    label5.Foreground       = Brushes.Beige;
                    label6.Foreground       = Brushes.Beige;
                    label7.Foreground       = Brushes.Beige;
                    label8.Foreground       = Brushes.Beige;
                    label9.Foreground       = Brushes.Beige;
                    label99.Foreground      = Brushes.Beige;
                    label9_Copy.Foreground  = Brushes.Beige;
                    label9_Copy1.Foreground = Brushes.Beige;
                    label9_Copy2.Foreground = Brushes.Beige;
                    Boarder1.BorderBrush    = Brushes.Beige;
                    Boarder2.BorderBrush    = Brushes.Beige;
                    button.Background       = Brushes.White;
                    button1.Background      = Brushes.White;
                    button2.Background      = Brushes.White;
                }
                else if (ls[i].BackColor == "BuntB")
                {
                    linebrush.StartPoint = new Point(0, 0);
                    linebrush.EndPoint   = new Point(0, 1);
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.Yellow, 0.0));
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.Red, 0.25));
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.Blue, 0.75));
                    linebrush.GradientStops.Add(
                        new GradientStop(Colors.LimeGreen, 1.0));
                    Background = linebrush;
                }

                fr.Close();
            }
            catch (Exception ex)
            {
                textBox1.Text       = "0,00";
                textBox2.Text       = "08";
                textBox3.Text       = "00";
                textBox4.Text       = "30";
                textBox5.Text       = "17";
                textBox6.Text       = "00";
                textBox5_Copy1.Text = "2,5";
                // StartSnow(); //Kann Ab januar Deaktiviert WERDEN!
            }
            textBox1.Focus();
            textBox1.SelectAll();
        }
예제 #35
0
        public void Func(string Params)
        {
            if (_init == 0)
            {
                SetProgressEvent _event = new SetProgressEvent(UnityEventType.SetProgressEvent);
                _event.TunnelSectionList = new List <TunnelSection>();
                List <Tuple <string, string> > list = Globals.tunnelSectionList;
                foreach (var data in Globals.tunnelSectionList)
                {
                    _event.TunnelSectionList.Add(new TunnelSection()
                    {
                        startM = data.Item1, endM = data.Item2
                    });
                }
                _event.TunnelPointList = new List <string>();
                double zmax = 0; double zmin = 20000; double ymax = 0; double ymin = 20000;
                string zmaxStr = ""; string zminStr = ""; string ymaxStr = ""; string yminStr = "";
                foreach (string str in Globals.tunnelPosList)
                {
                    if (str.StartsWith("YK"))
                    {
                        double mi = getMileage(str);
                        if ((mi < 7000) && (mi > ymax))
                        {
                            ymax = mi; ymaxStr = str;
                        }
                        if ((mi > 7000) && (mi < ymin))
                        {
                            ymin = mi; yminStr = str;
                        }
                    }
                    if (str.StartsWith("ZK"))
                    {
                        double mi = getMileage(str);
                        if ((mi < 7000) && (mi > zmax))
                        {
                            zmax = mi; zmaxStr = str;
                        }
                        if ((mi > 7000) && (mi < zmin))
                        {
                            zmin = mi; zminStr = str;
                        }
                    }
                }
                _event.TunnelPointList.Add(ymaxStr);
                _event.TunnelPointList.Add(zmaxStr);
                _event.TunnelPointList.Add(yminStr);
                _event.TunnelPointList.Add(zminStr);
                U3DViewModel model = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel;
                model.ExcuteCommand(JsonConvert.SerializeObject(_event));
            }
            else
            {
                _state = !_state;
                SetProgressEvent _event = new SetProgressEvent(UnityEventType.SetProgressEvent);
                _event.state = _state;
                U3DViewModel model = Globals.mainFrame.views.Where(x => x.baseType == ViewBaseType.D3).FirstOrDefault() as U3DViewModel;
                model.ExcuteCommand(JsonConvert.SerializeObject(_event));
            }
            _init++;

            Project   _prj = Globals.project;
            Domain    _constructionDoamin = _prj.getDomain("Construction");
            DGObjects _gprfDGObjects      = _constructionDoamin.DGObjectsList.Where(x => x.definition.Type == "ACHE").FirstOrDefault();

            Globals.mainFrame.DGObjectsSelectionChangedListener(this, new DGObjectsSelectionChangedEvent()
            {
                newObjs = _gprfDGObjects
            });
            //二维视图改变
            IMainFrame mainFrame = Globals.mainFrame;
            //获取要添加图元的视图view
            IView2D       _inputView       = (mainFrame.views.Where(x => x.name == "右幅剖面图").FirstOrDefault()) as IView2D;
            List <string> dynamiclayerlist = new List <string>()
            {
                "ACHE", "ACHE_EC", "ACHE_YG", "ACHE_ZZM"
            };

            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            iS3Legned legeng_ACHE = new iS3Legned()
            {
                legndTitle    = "施工进度图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        colorName = "Yellow", label = "初衬", symbolType = SymbolType.Rectangle
                    },
                    new iS3Symbol()
                    {
                        colorName = "GreenYellow", label = "二衬", symbolType = SymbolType.Rectangle
                    },
                    new iS3Symbol()
                    {
                        colorName = "Khaki", label = "仰拱", symbolType = SymbolType.Rectangle
                    },
                    new iS3Symbol()
                    {
                        label = "掌子面", symbolType = SymbolType.Icon, refPath = "redflag.png"
                    }
                    //new iS3Symbol(){label="图片",symbolType=SymbolType.Icon,refPath="照片.png"}
                }
            };

            _inputView.holder.setlegend(legeng_ACHE);
            _inputView.holder.setLegendShow(true);

            _inputView       = (mainFrame.views.Where(x => x.name == "左幅剖面图").FirstOrDefault()) as IView2D;
            dynamiclayerlist = new List <string>()
            {
                "ACHE", "ACHE_EC", "ACHE_YG", "ACHE_ZZM"
            };
            _inputView.Opendynamiclayers(dynamiclayerlist, "施工进度");
            legeng_ACHE = new iS3Legned()
            {
                legndTitle    = "施工进度图例",
                iS3SymbolList = new List <iS3Symbol>()
                {
                    new iS3Symbol()
                    {
                        colorName = "Yellow", label = "初衬", symbolType = SymbolType.Rectangle
                    },
                    new iS3Symbol()
                    {
                        colorName = "GreenYellow", label = "二衬", symbolType = SymbolType.Rectangle
                    },
                    new iS3Symbol()
                    {
                        colorName = "Khaki", label = "仰拱", symbolType = SymbolType.Rectangle
                    },
                    new iS3Symbol()
                    {
                        label = "掌子面", symbolType = SymbolType.Icon, refPath = "redflag.png"
                    }
                    //new iS3Symbol(){label="图片",symbolType=SymbolType.Icon,refPath="照片.png"}
                }
            };
            _inputView.holder.setlegend(legeng_ACHE);
            _inputView.holder.setLegendShow(true);
        }
        public Einstellungen()
        {
            MainFrame = MainWindow.Me;
            InitializeComponent();
            checkBox.IsChecked = MainFrame.IsSnowing(); //Kann Ab januar Deaktiviert WERDEN! NEIN!
            if (checkBox.IsChecked == true)
            {
                label2_Copy.IsEnabled = false;
                comboBox.IsEnabled    = false;
            }
            else
            {
                checkBox.IsChecked    = false;
                label2_Copy.IsEnabled = true;
                comboBox.IsEnabled    = true;
            }

            Oeffnet();
            ls = new List <DefaultWerte>();
            xs = new XmlSerializer(typeof(List <DefaultWerte>));
            try
            {
                FileStream fr = new FileStream(path, FileMode.Open, FileAccess.Read);
                ls = (List <DefaultWerte>)xs.Deserialize(fr);
                int i = ls.Count;
                i                  = i - 1;
                textBox.Text       = ls[i].ZeitGuthaben;
                textBox_Copy.Text  = ls[i].GekommenH;
                textBox_Copy1.Text = ls[i].GekommenM;
                textBox_Copy2.Text = ls[i].Pause;
                textBox_Copy3.Text = ls[i].WillGehenH;
                textBox_Copy4.Text = ls[i].WillGehenM;
                textBox_Copy5.Text = ls[i].Wunschfaktor;
                if (ls[i].Winter == "True")
                {
                    checkBox.IsChecked = true;
                }
                else
                {
                    checkBox.IsChecked = false;
                }

                if (ls[i].BackColor == "WhiteB")
                {
                    comboBox.SelectedItem = WhiteB;
                }
                else if (ls[i].BackColor == "DarkGrayB")
                {
                    comboBox.SelectedItem = DarkGrayB;
                }
                else if (ls[i].BackColor == "GreenB")
                {
                    comboBox.SelectedItem = GreenB;
                }
                else if (ls[i].BackColor == "LightBlueB")
                {
                    comboBox.SelectedItem = LightBlueB;
                }
                else if (ls[i].BackColor == "RosaB")
                {
                    comboBox.SelectedItem = RosaB;
                }
                else if (ls[i].BackColor == "LightCoralB")
                {
                    comboBox.SelectedItem = LightCoralB;
                }
                else if (ls[i].BackColor == "LightYellowB")
                {
                    comboBox.SelectedItem = LightYellowB;
                }
                else if (ls[i].BackColor == "BlackB")
                {
                    comboBox.SelectedItem = BlackB;
                }
                else if (ls[i].BackColor == "RealBlackB")
                {
                    comboBox.SelectedItem = RealBlackB;
                }
                else if (ls[i].BackColor == "BuntB")
                {
                    comboBox.SelectedItem = BuntB;
                }

                fr.Close();
            }
            catch (Exception ex)
            {
                //    comboBox.SelectedItem = LightCoralB; //auf weiß ändern im januar
                comboBox.SelectedItem = WhiteB; //auf weiß ändern im januar
            }
        }
예제 #37
0
 public GameClient(IMainFrame frame, bool isUdp, int keepAliveTimeout)
 {
     this.frame            = frame;
     this.isUdp            = isUdp;
     this.keepAliveTimeout = keepAliveTimeout;
 }