当前位置: 首页>>代码示例>>C#>>正文


C# Connect类代码示例

本文整理汇总了C#中Connect的典型用法代码示例。如果您正苦于以下问题:C# Connect类的具体用法?C# Connect怎么用?C# Connect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Connect类属于命名空间,在下文中一共展示了Connect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Awake

 // Use this for initialization
 void Awake()
 {
     score = 0;
     scoreEditor = 0;
     scorePanel = GetComponent<Text>();
     server = GameObject.FindGameObjectWithTag("Server").GetComponent<Connect>();
 }
开发者ID:hellwilliam,项目名称:DonkeyKongRemake,代码行数:8,代码来源:ScoreManager.cs

示例2: GetAllBranches

 /// <summary>
 /// This method fetches the list of branches from the database.
 /// </summary>
 /// <returns>It returns a data set containing the list of branches.</returns>
 public static DataSet GetAllBranches()
 {
     sql = "SELECT * FROM Branches";
     Connect.ConnectTT();
     c = new Connect(sql);
     return c.ds;
 }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:11,代码来源:ParticipantRepository.cs

示例3: erlReceive

    public override void erlReceive(Connect connect, ErlKVMessage message)
    {
        if (!MiniConnectManager.IsRobot )
        {
            try
            {

               // Log.debug("===============this is socketReceive! cmd=" + message.Cmd + " jsonString " + message.toJsonString(),true);
            }
            catch (Exception exception)
            {
                //Log.debug(" =================== : " + exception.ToString(),true);
            }
        }
        string cmd = message.Cmd;
        switch (cmd)
        {
            case "r_ok":
            case "r_err":
            {
                int port = message.getPort();
                ErlEntry entry = this.removeReciveFun(port);
                if ((entry == null) || (entry.receiveFun == null))
                {
                    return;
                }
                entry.receiveFun(connect, message);
                break;
            }
            default:
                message.addValue("cmd", new ErlString(cmd));
                this.defaultHandle(connect, message);
                break;
        }
    }
开发者ID:hebbaixue99,项目名称:XJDemoServer,代码行数:35,代码来源:DataAccess.cs

示例4: Form1

 public Form1()
 {
     InitializeComponent();
     pref = new prefs();
     pref.Owner = this;
     if (File.Exists("prefs"))
     {
         BinaryFormatter formatter = new BinaryFormatter();
         FileStream inputStream = File.OpenRead("prefs");
         try
         {
             Con = (Connect)formatter.Deserialize(inputStream);
         }
         catch (Exception ex)
         {
             System.Windows.Forms.MessageBox.Show("Ошибка:\n" + ex.Message, "",
                             MessageBoxButtons.OK,
                             MessageBoxIcon.Error);
         }
         inputStream.Close();
     }
     else
     {
         BinaryFormatter formatter = new BinaryFormatter();
         FileStream outputStream = File.OpenWrite("prefs");
         formatter.Serialize(outputStream, Con);
         outputStream.Close();
     }
 }
开发者ID:Taubm,项目名称:RoutSearching,代码行数:29,代码来源:Graph_form.cs

示例5: User

 public User()
 {
     _Updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>();
     _ConnectProvider = new Regulus.Remoting.Ghost.TProvider<TestNativeGameCore.IConnect>();
     _Connecter = new Connect();
     _Complex = new Regulus.Remoting.Ghost.Native.Agent();
 }
开发者ID:kof1016,项目名称:Regulus,代码行数:7,代码来源:User.cs

示例6: GetAllSocieties

 /// <summary>
 /// This method returns all the societies from the database.
 /// </summary>
 /// <returns>It returns a datatable containing all the societies.</returns>
 public static DataTable GetAllSocieties()
 {
     sql = "SELECT * FROM Societies";
     Connect.ConnectEMS();
     c = new Connect(sql);
     return c.ds.Tables[0];
 }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:11,代码来源:SocietyRepository.cs

示例7: GetAllEvents

 /// <summary>
 /// This method fetches all the events from the database.
 /// </summary>
 /// <returns>It returns a datatable containing all the events.</returns>
 public static DataTable GetAllEvents()
 {
     sql = "SELECT * FROM Events";
     Connect.ConnectEMS();
     c = new Connect(sql);
     return c.ds.Tables[0];
 }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:11,代码来源:EventRepository.cs

示例8: Start

    //init
    void Start() { 
        //get game objects from scene
        globalObj = GameObject.FindWithTag(TAG_GLOBAL); //global game object
        globalScript = globalObj.GetComponent<Global>(); //global script
        setupObj = GameObject.FindWithTag(TAG_SETUP); //setup game object
        connectScript = setupObj.GetComponent<Connect>(); //connect script
        activateScript = setupObj.GetComponent<Activate>(); //activate script

        //disable scripts to start
        //note: disable/uncheck scripts in the Unity interface
        connectScript.enabled = false;
        activateScript.enabled = false;

        //state manager
        //transition into scene
        //initialize since this is the first scene
        if (StateManager.Instance != null) {
            //set the transition effects for the state manager
            StateManager.Instance.gameObject.GetComponent<TransitionFade>().isFadingIn = true;
            StateManager.Instance.gameObject.GetComponent<TransitionFade>().isHoldFade = false;
        }

        //audio manager
        //initialize since this is the first scene
        if (AudioManager.Instance != null) {
            //set the transition effects for the audio manager
            //bgm
            AudioManager.Instance.switchBgmAfterDelay(AudioManager.Instance.bgmMenu, 0.0f);
            AudioManager.Instance.bgmIsFadingIn = true;
            AudioManager.Instance.bgmIsHoldFade = false;
        }

    } //end function
开发者ID:Ar2rZ,项目名称:tetbeams,代码行数:34,代码来源:SetupManager.cs

示例9: ExpressionHighlighterPlugin

 public ExpressionHighlighterPlugin(Connect con, DTE2 appObject, AddIn addinInstance)
     : base(con, appObject, addinInstance)
 {
     workerToDos.WorkerReportsProgress = false;
     workerToDos.WorkerSupportsCancellation = true;
     workerToDos.DoWork += new System.ComponentModel.DoWorkEventHandler(workerToDos_DoWork);
 }
开发者ID:sgtgold,项目名称:bids-helper-extension,代码行数:7,代码来源:ExpressionHighlighterPlugin.cs

示例10: BtnStart_Click

 protected void BtnStart_Click(object sender, EventArgs e)
 {
     sql = "SELECT SubjectType FROM Subject WHERE SubjectID=" + int.Parse(DDLSubjects.SelectedValue.ToString()) + "";
     c = new Connect(sql);
     if (c.ds.Tables[0].Rows[0]["SubjectType"].ToString().Equals("Theory"))
     {
         sql = "SELECT StudentNo,RollNo,Name FROM Student WHERE SectionID=" + int.Parse(DDLSectionGroup.SelectedValue.ToString()) + " AND Semester=(SELECT Semester FROM Subject WHERE SubjectID=" + int.Parse(DDLSubjects.SelectedValue.ToString()) + ")";
         c = new Connect(sql);
         GridView1.DataSource = c.ds;
         GridView1.DataBind();
     }
     else
     {
         sql = "SELECT StudentNo,RollNo,Name FROM Student WHERE GroupID=" + int.Parse(DDLSectionGroup.SelectedValue.ToString()) + " AND Semester=(SELECT Semester FROM Subject WHERE SubjectID=" + int.Parse(DDLSubjects.SelectedValue.ToString()) + ")";
         c = new Connect(sql);
         GridView1.DataSource = c.ds;
         GridView1.DataBind();
     }
     BtnSubmit.Visible = true;
     sql = "SELECT * FROM AttendanceType";
     c = new Connect(sql);
     foreach (GridViewRow row in GridView1.Rows)
     {
         DropDownList d = (DropDownList)row.FindControl("DDLAttendanceType");
         d.DataSource = c.ds;
         d.DataTextField = "AttendanceTypeName";
         d.DataValueField = "AttendanceTypeID";
         d.Width = 40;
         d.DataBind();
         d.Items[2].Attributes.CssStyle["Color"] = "red";
     }
 }
开发者ID:priyanshu92,项目名称:AttendanceManagementSystem,代码行数:32,代码来源:UploadAttendance.aspx.cs

示例11: Test01

 void Test01()
 {
     var gd = new Connect();
     var sample = new Sample
                      {
                          Method = "GET",
                          Uri = "/test",
                          Timestamp = DateTime.Now.TimeOfDay.TotalMilliseconds,
                          ResponseTime = 100,
                          CpuTime = 20,
                          Context =
                              new[]
                                  {
                                      new Context {Name = "/", ResponseTime = 11},
                                      new Context {Name = "/one", ResponseTime = 12},
                                      new Context {Name = "/two", ResponseTime = 13}
                                  }
                      };
     gd.Init("26873", "testing", logger, null);
     for (int i = 0; i < 1000; i++)
     {
         gd.Store(sample, logger, null);
         Thread.Sleep(300);
     }
     gd.Term(logger, null);
     Console.Read();
 }
开发者ID:alphashack,项目名称:NET_graphdat,代码行数:27,代码来源:Program.cs

示例12: BIDSHelperPluginReference

        public BIDSHelperPluginReference(Type t, DTE2 applicationObject, AddIn addInInstance, Connect addinCore)
        {
            pluginType = t;
            _applicationObject = applicationObject;
            _addInInstance = addInInstance;
            _core = addinCore;

        }
开发者ID:japj,项目名称:bidshelper,代码行数:8,代码来源:BIDSHelperPluginReference.cs

示例13: GetEventDetails

 /// <summary>
 /// This method fetches the details of a particular event.
 /// </summary>
 /// <param name="eventID">An integer parameter containing the ID of the event.</param>
 /// <returns>It returns a data table containing the details of the event.</returns>
 public static DataTable GetEventDetails(int eventID)
 {
     sql = "SELECT * FROM Events WHERE [email protected]";
     string[] s = { "@eventID" };
     Connect.ConnectEMS();
     c = new Connect(sql, s, eventID);
     return c.ds.Tables[0];
 }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:13,代码来源:EventRepository.cs

示例14: GetStudentDetails

 /// <summary>
 /// This method fetches the details of the student from the EMS database based on the student number.
 /// </summary>
 /// <param name="studentNumber">A string containing the student number of the student.</param>
 /// <returns>It returns a data table containing the details of the student.</returns>
 public static DataTable GetStudentDetails(string studentNumber)
 {
     sql = "SELECT * FROM Students WHERE [email protected]";
     Connect.ConnectEMS();
     string[] s = { "@StudentNo" };
     c = new Connect(sql, s, studentNumber);
     return c.ds.Tables[0];
 }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:13,代码来源:StudentRepository.cs

示例15: GetOrganiserDetails

 /// <summary>
 /// This method fetches the details of the organiser based on the username and password.
 /// </summary>
 /// <param name="username">A string containing the username of the organiser.</param>
 /// <param name="password">A string containing the password of the organiser.</param>
 /// <returns>It returns a data table containing the details of the organiser.</returns>
 public static DataTable GetOrganiserDetails(string username,string password)
 {
     sql = "SELECT * FROM Login WHERE [email protected] AND [email protected]";
     Connect.ConnectEMS();
     string[] s = { "@username", "@password" };
     c = new Connect(sql, s, username, password);
     return c.ds.Tables[0];
 }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:14,代码来源:OrganiserRepository.cs


注:本文中的Connect类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。