예제 #1
0
        private void Initialize(OnCloseCallback onCloseCB)
        {
            m_OnCloseCB = onCloseCB;

            // Set default edit mode to Terrain
            OnClick_EditMode(0);
        }
        protected override async Task HandleOk(MouseEventArgs e)
        {
            validationResult = validator.Validate(DomainNameCreateRequest);

            if (validationResult.IsValid)
            {
                displayError = false;

                loadInProgress = true;

                var claimResult = await DomainNameService.CreateDomainNameAsync(DomainNameCreateRequest);

                if (claimResult)
                {
                    DomainNameCreateRequest = new DomainNameCreateRequest();
                    Dispatcher.Dispatch(new FetchDomainNameAction());

                    await OnCloseCallback.InvokeAsync(e);

                    await NotificationService.Open(new NotificationConfig()
                    {
                        Message          = Translator.GetString("CLAIM_SUCCESS_NOTIFICATION_TITLE").Value,
                        Description      = Translator.GetString("CLAIM_SUCCESS_NOTIFICATION_CONTENT").Value,
                        NotificationType = NotificationType.Success
                    });
                }
                else
                {
                    displayError = true;
                }

                loadInProgress = false;
            }
        }
        private async Task HandleOk(MouseEventArgs e)
        {
            Dispatcher.Dispatch(new CreateClusterAction(ClusterCreateRequest));
            await OnCloseCallback.InvokeAsync(e);

            Visible = false;
            StateHasChanged();
        }
예제 #4
0
        /// <summary>
        /// Creates and presents the Mission Properties dialog to the user.
        /// </summary>
        /// <param name="userData">The user data to display and modify.</param>
        /// <param name="onCloseCB">The callback fired when the dialog closes.</param>
        public static MissionPropertiesDialog Create(UserData userData, OnCloseCallback onCloseCB = null)
        {
            GameObject goDialog            = Instantiate(Resources.Load <GameObject>("Dialogs/MissionPropertiesDialog"));
            MissionPropertiesDialog dialog = goDialog.GetComponent <MissionPropertiesDialog>();

            dialog.Initialize(userData, onCloseCB);

            return(dialog);
        }
        /// <summary>
        /// Creates and presents the Player Properties dialog to the user.
        /// </summary>
        /// <param name="onCloseCB">The callback fired when the dialog closes.</param>
        public static PlayerPropertiesDialog Create(OnCloseCallback onCloseCB = null)
        {
            GameObject             goDialog = Instantiate(Resources.Load <GameObject>("Dialogs/PlayerPropertiesDialog"));
            PlayerPropertiesDialog dialog   = goDialog.GetComponent <PlayerPropertiesDialog>();

            dialog.Initialize(onCloseCB);

            return(dialog);
        }
예제 #6
0
 public void Register(OnConnectCallback onconnect, OnCloseCallback onclose, OnMessageCallback onmessage, LogType log = null)
 {
     this.onconnect = onconnect;
     this.onclose   = onclose;
     this.onmessage = onmessage;
     this.log       = log;
     if (this.log == null)
     {
         this.log = Console.WriteLine;
     }
 }
예제 #7
0
        private void Initialize(MapRenderer mapRenderer, UnitRenderer unitRenderer, OnCloseCallback onCloseCB)
        {
            m_MapRenderer  = mapRenderer;
            m_UnitRenderer = unitRenderer;
            m_OnCloseCB    = onCloseCB;

            mapRenderer.onMapRefreshedCB += OnMapRefreshed;
            m_UnitRenderer.onRefreshedCB += OnUnitRendererRefreshed;

            OnMapRefreshed(mapRenderer);
        }
예제 #8
0
        public CardForm(string ReaderName, Image ReaderImage, OnCloseCallback OnClose)
            : base()
        {
            InitializeComponent();
            reader_name = ReaderName;
            on_close    = OnClose;

            Text = ReaderName;
            Icon = ImageConvert.ImageToIcon(ReaderImage, 16, true);

            hexBoxCApdu.ByteProvider = new DynamicByteProvider(new List <Byte>());
            hexBoxCCtrl.ByteProvider = new DynamicByteProvider(new List <Byte>());
        }
예제 #9
0
 public void Close()
 {
     if (IsUse)
     {
         if (m_Socket != null && m_Socket.Connected)
         {
             m_Socket.Shutdown(SocketShutdown.Both);
         }
         m_Socket.Close();
         IsUse = false;
         SocketLogError("Socket Close");
         OnCloseCallback?.Invoke(this);
     }
 }
예제 #10
0
    private void ShowGameGuideDlg()
    {
        NrTSingleton <GameGuideManager> .Instance.Update(GameGuideCheck.NONE, GameGuideType.CHALLENGE_PREMIUM_ONE);

        NrTSingleton <GameGuideManager> .Instance.Update();

        OnCloseCallback callback = null;

        if (this._challengeQuestUnique == 1500)
        {
            callback = new OnCloseCallback(ItemMallDlg_ChallengeQuest.OnShowHelpDlg_Game);
        }
        GameGuideDlg gameGuideDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.GAMEGUIDE_DLG) as GameGuideDlg;

        gameGuideDlg.RegistCloseCallback(callback);
    }
    private void ShowGameGuideDlg(GameGuideType guideType)
    {
        NrTSingleton <GameGuideManager> .Instance.Update(GameGuideCheck.NONE, guideType);

        NrTSingleton <GameGuideManager> .Instance.Update();

        OnCloseCallback callback = null;

        if (this.ChallengeQuestUnique == 1504)
        {
            callback = new OnCloseCallback(Myth_Evolution_Main_DLG_ChallengeQuest.OnGuideEnd);
        }
        GameGuideDlg gameGuideDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.GAMEGUIDE_DLG) as GameGuideDlg;

        gameGuideDlg.RegistCloseCallback(callback);
    }
예제 #12
0
        private void Initialize(OnCloseCallback onCloseCB)
        {
            m_OnCloseCB = onCloseCB;

            m_txtGameDirectory.text = UserPrefs.gameDirectory;

            // If user does not have a game directory, force them to select one
            if (string.IsNullOrEmpty(UserPrefs.gameDirectory))
            {
                OnClick_LocateGameDirectory();
            }

            // Initialize grid overlay sliders
            Color32 gridColor = UserPrefs.gridOverlayColor;

            m_SliderGridRed.value   = m_SliderGridGreen.value = m_SliderGridBlue.value = m_SliderGridAlpha.value = 1;           // Force refresh
            m_SliderGridRed.value   = gridColor.r;
            m_SliderGridGreen.value = gridColor.g;
            m_SliderGridBlue.value  = gridColor.b;
            m_SliderGridAlpha.value = gridColor.a;

            // Initialize resolution options
            m_DropdownResolution.ClearOptions();
            List <string> resOptions = new List <string>();

            for (int i = 0; i < Screen.resolutions.Length; ++i)
            {
                resOptions.Add(Screen.resolutions[i].width.ToString() + "x" + Screen.resolutions[i].height + " @ " + Screen.resolutions[i].refreshRate + "hz");
            }

            m_DropdownResolution.AddOptions(resOptions);

            // Set current resolution
            for (int i = 0; i < Screen.resolutions.Length; ++i)
            {
                if (Screen.resolutions[i].Equals(Screen.currentResolution))
                {
                    m_DropdownResolution.value = i;
                    break;
                }
            }

            m_ToggleIsWindowed.isOn = !Screen.fullScreen;

            m_IsInitialized = true;
        }
        private void Initialize(OnCloseCallback onCloseCB)
        {
            m_OnCloseCB = onCloseCB;

            UserData.current.onSelectVariantCB += OnChanged_SelectedVariant;

            // Initialize display
            m_PlayerListBox.onSelectedItemCB        += OnSelect_Player;
            m_AllyListBox.onSelectedItemCB          += OnSelect_Ally;
            m_CompletedTechListBox.onSelectedItemCB += OnSelect_CompletedTech;

            PopulatePlayerList();

            ReadTechFile();

            m_CanSave = true;
        }
예제 #14
0
        private void Initialize(UserData userData, OnCloseCallback onCloseCB)
        {
            m_UserData  = userData;
            m_OnCloseCB = onCloseCB;

            UserData.current.onSelectVariantCB += OnChangedUserData;

            // Initialize display
            m_InputDescription.text      = userData.mission.levelDetails.description;
            m_InputMapName.text          = userData.mission.levelDetails.mapName;
            m_InputTechTreeName.text     = userData.mission.levelDetails.techTreeName;
            m_DropdownMissionType.value  = (-(int)userData.mission.levelDetails.missionType) - 1;
            m_InputMaxTechLevel.text     = userData.mission.levelDetails.maxTechLevel.ToString();
            m_ToggleUnitOnlyMission.isOn = userData.mission.levelDetails.unitOnlyMission;

            OnChangedUserData(userData);

            m_ShouldSave = true;
        }
예제 #15
0
    private void ShowGameGuideDlg(GameGuideType guideType)
    {
        NrTSingleton <GameGuideManager> .Instance.Update(GameGuideCheck.NONE, guideType);

        NrTSingleton <GameGuideManager> .Instance.Update();

        OnCloseCallback callback = null;

        if (this._challengeQuestUnique == 1502)
        {
            callback = new OnCloseCallback(SolComposeMainDlg_challengequest.OnExtractSuccessGuideEnd);
        }
        else if (this._challengeQuestUnique == 1505)
        {
            callback = new OnCloseCallback(SolComposeMainDlg_challengequest.OnTranscendenceSuccessGuideEnd);
        }
        else if (this._challengeQuestUnique == 1499)
        {
            callback = new OnCloseCallback(SolComposeMainDlg_challengequest.OnComposeSuccessGuideEnd);
        }
        GameGuideDlg gameGuideDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.GAMEGUIDE_DLG) as GameGuideDlg;

        gameGuideDlg.RegistCloseCallback(callback);
    }
예제 #16
0
 public static extern void WebSocketSetOnClose(OnCloseCallback callback);
 private void HandleCancel(MouseEventArgs e)
 {
     OnCloseCallback.InvokeAsync(e).Wait();
     StateHasChanged();
 }
예제 #18
0
 [DllImport("__Internal")] public static extern int WebSocketSetOnClose(OnCloseCallback Callback);
 internal static extern void SetOnCloseDelegate(OnCloseCallback callback);
 internal static extern void _SetOnClose(OnCloseCallback callback);
예제 #21
0
 public void RegistCloseCallback(OnCloseCallback callback)
 {
     this._closeCallback = callback;
 }
예제 #22
0
 public void Open(OnCloseCallback closeCallback)
 {
     _closeCallback = closeCallback;
     _animator.SetBool("open", true);
 }
        protected override async Task HandleCancel(MouseEventArgs e)
        {
            await OnCloseCallback.InvokeAsync(e);

            StateHasChanged();
        }
예제 #24
0
 public void AddCloseCallback(OnCloseCallback callback)
 {
     this._closeCallback = (OnCloseCallback)Delegate.Combine(this._closeCallback, callback);
 }
예제 #25
0
        /// <summary>
        /// Creates and presents the Preferences dialog to the user.
        /// </summary>
        /// <param name="mapRenderer">The map to render as a minimap.</param>
        /// <param name="unitRenderer">The units to render to the minimap.</param>
        /// <param name="onCloseCB">The callback fired when the dialog closes.</param>
        public static MinimapDialog Create(MapRenderer mapRenderer, UnitRenderer unitRenderer, OnCloseCallback onCloseCB = null)
        {
            GameObject    goDialog = Instantiate(Resources.Load <GameObject>("Dialogs/MinimapDialog"));
            MinimapDialog dialog   = goDialog.GetComponent <MinimapDialog>();

            dialog.Initialize(mapRenderer, unitRenderer, onCloseCB);

            return(dialog);
        }