public override string ToString()
 {
     return(String.Format("{0} (profile: {1}, guid: {2})",
                          Configuration.ServiceName,
                          Configuration.Profile == null ? "default" : Configuration.Profile.ProfileID.ToString("N"),
                          InstanceID.ToString("N")
                          ));
 }
Пример #2
0
 public override string ToString()
 {
     if (ObjectName == null)
     {
         ObjectReference or = new ObjectReference();
         or.Parse(_id);
         return(or.ToString());
     }
     else
     {
         string iname = InstanceName != null ? "\"" + InstanceName + "\"" : InstanceID.ToString("X8");
         return(string.Format("Object: {0} Instance: {1}", ObjectName, iname));
     }
 }
Пример #3
0
        /// <summary>
        /// レコードの文字列を作成する
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            var s  = GetType().Name + " ID=" + InstanceID.ToString() + " ";
            var ss = GetStrings();

            for (var i = 0; i < ss.Length; i++)
            {
                if (i > 0)
                {
                    s += ", ";
                }
                s += ss[i];
            }
            return(s);
        }
Пример #4
0
        public void LoadModel()
        {
            var template = MetadataManager.Instance.GetTemplate <ModelTemplate>(modelResID);

            if (null != template && !string.IsNullOrEmpty(template.modelPath))
            {
                WebManager.Instance.LoadWebPrefab("prefabs/character/" + template.modelPath, prefab =>
                {
                    using (prefab)
                    {
                        _model      = prefab.mainAsset.CloneEx() as GameObject;
                        _model.name = InstanceID.ToString();
                    }
                });
            }
            else
            {
                Console.Error.WriteLine("[VisualObject.LoadModel] please check modeltemplate.xlsx. modelResID = {0}", modelResID);
            }
        }
Пример #5
0
 public WarpZone(asd.Vector2DF pos, asd.Vector2DF warpPos)
 {
     InstanceID     = GenerateID();
     WarpID         = InstanceID;
     WarpPos        = warpPos;
     Position       = pos;
     Texture        = asd.Engine.Graphics.CreateTexture2D("WarpZone.png");
     Color          = new asd.Color(255, 255, 255, 90);//透明感出したい
     Scale          = 1.2f * new asd.Vector2DF((float)Program.CellLarge / (float)Texture.Size.X, (float)Program.CellLarge / (float)Texture.Size.Y);
     CenterPosition = new asd.Vector2DF(Texture.Size.X / 2, Texture.Size.Y / 2);
     InstanceIDText = new GeneralText(Position - Adjust * new asd.Vector2DF(Program.CellLarge, Program.CellLarge), InstanceID.ToString(), Program.CellLarge / 2, Black, 0, Black);
     AddDrawnChild(InstanceIDText, asd.ChildManagementMode.RegistrationToLayer | asd.ChildManagementMode.Disposal, asd.ChildTransformingMode.Nothing, asd.ChildDrawingMode.Nothing);
     WarpIDText = new GeneralText(Position + Adjust * new asd.Vector2DF(0, Program.CellLarge), "→" + InstanceID.ToString(), Program.CellLarge / 2, Black, 0, Black);
     AddDrawnChild(WarpIDText, asd.ChildManagementMode.RegistrationToLayer | asd.ChildManagementMode.Disposal, asd.ChildTransformingMode.Nothing, asd.ChildDrawingMode.Nothing);
 }
Пример #6
0
        protected override void OnToolGUI()
        {
            if (this.m_toolController.IsInsideUI)
            {
                return;
            }

            InstanceID hoverInstance = this.m_hoverInstance;
            Event      current       = Event.current;

            if (current.type == EventType.MouseDown)
            {
                if (current.button == 0)
                {
                    //Log.info(m_mousePosition.ToString());

                    try {
                        Log.debug("You clicked on " + hoverInstance.ToString());
                        Log.debug(hoverInstance.Type.ToString());


                        if (hoverInstance.Type == InstanceType.Vehicle)
                        {
                            gui.SetReport(null);
                            base.ToolCursor = loadingCursor;
                            analyzer.ReportOnVehicle(hoverInstance.Vehicle);
                        }

                        if (hoverInstance.Type == InstanceType.NetSegment)
                        {
                            gui.SetReport(null);
                            base.ToolCursor = loadingCursor;
                            analyzer.ReportOnSegment(hoverInstance.NetSegment);
                        }

                        if (hoverInstance.Type == InstanceType.Building)
                        {
                            gui.SetReport(null);
                            base.ToolCursor = loadingCursor;
                            analyzer.ReportOnBuilding(hoverInstance.Building);
                        }


                        if (hoverInstance.Type == InstanceType.CitizenInstance)
                        {
                            gui.SetReport(null);
                            base.ToolCursor = loadingCursor;
                            analyzer.ReportOnCitizen(hoverInstance.CitizenInstance);
                        }
                    } catch (Exception e) {
                        Log.error(e.ToString());
                        Log.error(e.StackTrace);
                    }
                }
            }
            else
            {
                if (hoverInstance.Type == InstanceType.NetSegment)
                {
                    gui.SetSegmentHighlight(QueryToolGUIBase.HighlightType.Segment, (uint)hoverInstance.NetSegment);
                }
                else if (hoverInstance.Type == InstanceType.Building)
                {
                    gui.SetSegmentHighlight(QueryToolGUIBase.HighlightType.Building, (uint)hoverInstance.Building);
                }
                else if (hoverInstance.Type == InstanceType.Vehicle)
                {
                    gui.SetSegmentHighlight(QueryToolGUIBase.HighlightType.Vehicle, (uint)hoverInstance.Vehicle);
                }
                else if (hoverInstance.Type == InstanceType.Citizen)
                {
                    gui.SetSegmentHighlight(QueryToolGUIBase.HighlightType.Citizen, (uint)hoverInstance.Vehicle);
                }
                else
                {
                    gui.SetSegmentHighlight(QueryToolGUIBase.HighlightType.None, 0);
                }
            }
            base.OnToolGUI();
        }
Пример #7
0
 protected override void register_database()
 {
     test2_index = manager.database.addData <int>(this.name + InstanceID.ToString() + "test2", test2);
 }
Пример #8
0
        protected void FastRSSLoad()
        {
            string      strXml = ViewState["XMLSettings"] as string;
            XmlDocument xmlDom = new XmlDocument();

            xmlDom.LoadXml(strXml);
            string url       = XmlHelper.GetElementValue(xmlDom.DocumentElement, "txtURL", string.Empty);
            int    feedCount = XmlHelper.GetElementValue(xmlDom.DocumentElement, "ddlFC", 3);

            showDesc = XmlHelper.GetElementValue(xmlDom.DocumentElement, "cbxDesc", true);
            ScriptManager.RegisterClientScriptInclude(this, GetType(), "FastRssWidget", ResolveClientUrl(SiteContext.VRoot + "/Library/Scripts/FastRssWidget.js"));
            ScriptManager.RegisterStartupScript(this, GetType(), "LoadRSS", string.Format("var rssLoaderWidget{0} = new FastRssWidget( '{1}', '{2}', {3}, {4} ); rssLoaderWidget{0}.load();", InstanceID.ToString().Replace("-", "_"), url, RssContainer.ClientID, feedCount, Convert.ToInt32(showDesc)), true);
        }
        /// <summary>
        /// Constructor, creates listener and starts listening
        /// </summary>
        /// <param name="dut">The device under test</param>
        /// <param name="localIp">The ip where listener will be hosted</param>
        public HttpListenerServerSim(string localIp) : base()
        {
            _listener        = new HttpListener();
            _endpointAddress = "http://" + localIp + ":" + "48650" + "/HttpListenerServerSim" + InstanceID.ToString() + "/";
            _listener.Prefixes.Add(EndpointAddress);
            _listener.AuthenticationSchemes = AuthenticationSchemes.Anonymous;

            DoStart();
        }