コード例 #1
0
    private void OnEnable()
    {
        resizerStyle = new GUIStyle();
        resizerStyle.normal.background = EditorGUIUtility.Load("icons/d_AvatarBlendBackground.png") as Texture2D;

        boxStyle = new GUIStyle();
        boxStyle.normal.textColor = new Color(0.7f, 0.7f, 0.7f);

        boxBgOdd      = EditorGUIUtility.Load("builtin skins/darkskin/images/cn entrybackodd.png") as Texture2D;
        boxBgEven     = EditorGUIUtility.Load("builtin skins/darkskin/images/cnentrybackeven.png") as Texture2D;
        boxBgSelected = EditorGUIUtility.Load("builtin skins/darkskin/images/menuitemhover.png") as Texture2D;

        textAreaStyle = new GUIStyle();
        textAreaStyle.normal.textColor  = new Color(0.9f, 0.9f, 0.9f);
        textAreaStyle.normal.background = EditorGUIUtility.Load("builtin skins/darkskin/images/projectbrowsericonareabg.png") as Texture2D;

        logs            = new List <SequenceLog>();
        selectedLog     = null;
        currentSequence = null;
        rootSequence    = null;

        this.AddObserver(OnBeginSequence, ActionSystem.beginSequenceNotification);
        this.AddObserver(OnEndSequence, ActionSystem.endSequenceNotification);
        this.AddObserver(OnCompleteSequence, ActionSystem.completeNotification);
    }
コード例 #2
0
    private void DrawUpperPanel()
    {
        upperPanel = new Rect(0, menuBarHeight, position.width, position.height * sizeRatio - menuBarHeight);

        GUILayout.BeginArea(upperPanel);
        upperPanelScroll = GUILayout.BeginScrollView(upperPanelScroll);

        for (int i = 0; i < logs.Count; i++)
        {
            if (!collapse || logs[i].parent == null)
            {
                if (DrawBox(showSequence ? logs[i].FullInfo : logs[i].info, i % 2 == 0, logs[i].isSelected))
                {
                    if (selectedLog != null)
                    {
                        selectedLog.isSelected = false;
                    }

                    logs[i].isSelected = true;
                    selectedLog        = logs[i];
                    GUI.changed        = true;
                }
            }
        }

        GUILayout.EndScrollView();
        GUILayout.EndArea();
    }
コード例 #3
0
    private void OnEndSequence(object sender, object args)
    {
        var gameAction = args as GameAction;

        foreach (var log in logs)
        {
            if (log.action == gameAction)
            {
                log.isActive    = false;
                currentSequence = log.parent;
            }
        }
    }
コード例 #4
0
ファイル: Inbox.cs プロジェクト: sumonzin/mftb_settlement
        private void ConfigChanger()
        {
            SequenceLog Seqlog = new SequenceLog();

            try
            {
                string HostPort   = string.Empty;
                string DBName     = string.Empty;
                string DBUserName = string.Empty;
                string DBPassword = string.Empty;
                string ServerName = string.Empty;

                DataRetriveFromReg dreg = new DataRetriveFromReg();
                AppConfigInfo.RegDataSuit = dreg.ServerConfigRetrieve();

                AppConfigInfo.RegDataSuit.Reset();
                while (AppConfigInfo.RegDataSuit.MoveNext())
                {
                    switch (AppConfigInfo.RegDataSuit.Key.ToString())
                    {
                    case "DBName":
                        DBName = Convert.ToString(AppConfigInfo.RegDataSuit.Value);
                        break;

                    case "DBUserName":
                        DBUserName = Convert.ToString(AppConfigInfo.RegDataSuit.Value);
                        break;

                    case "DBPassword":
                        DBPassword = Convert.ToString(AppConfigInfo.RegDataSuit.Value);
                        break;

                    case "ServerName":
                        ServerName = Convert.ToString(AppConfigInfo.RegDataSuit.Value);
                        break;

                    default:
                        break;
                    }
                }
                ConfigWriter cfw = new ConfigWriter();
                cfw.DBConnectionstringWriter("SettlementDB", ServerName, DBName, DBUserName, DBPassword);
            }
            catch (Exception ex)
            {
            }
        }
コード例 #5
0
    private void OnBeginSequence(object sender, object args)
    {
        var gameAction  = args as GameAction;
        var newSequence = new SequenceLog(false, true, gameAction, gameAction.GetType().Name);

        if (rootSequence == null)
        {
            rootSequence = newSequence;
        }
        else
        {
            newSequence.parent = currentSequence;
        }

        currentSequence = newSequence;
        logs.Add(newSequence);
    }
コード例 #6
0
 private void OnCompleteSequence(object sender, object args)
 {
     rootSequence = null;
 }