ZSSURE: XtraTabControl of DevExpress, OpenAccessContext of Telerik, and StarUML,
Question:
Today, my friend shared a deep article in his circle of friends, "please encourage your child to be a happy ordinary person." The article is a little long and I have a lot of feelings. In addition, I recently watched my nephew's step-by-step growth every day. I have gained a new understanding of learning, and I think back to my own growth process, experience and skills are not taught by my parents. Instead, they create a "free, open, or even slightly indulgent" Environment for me and set an example, from this, I realized all the details.
Speaking of the current software R & D work, think about the technologies that students rarely stay behind after graduation (let's think IT migrant workers are also a technology wave ), this is because of the hard work, pressure, and low reward. Why did you choose to stay? The reason is very simple. I want to remind myself to "Never forget to learn new knowledge and accumulate new skills" in such a high-intensity, high-freedom, and high-change environment ". Life skills, exam-taking skills, and life-making skills have no advantages or disadvantages, depending on different application scenarios. IT and the Internet teach us freedom, openness, and forge ahead. We must enrich ourselves at all times before we can be eliminated. This truth is perfect for all walks of life.
When I deeply agree with the points in the citation, I also have my own views:
[Zssure]: the birth of a baby, from the feeling of an organ, a breeze, a trace of fragrance, a sound, a touch, everything has been absorbed, and gradually extract information from it to reserve for the future accumulation. Just like the current hot AR technology, humans have the strongest brain to process countless massive amounts of data, as time increases and information is collected, experience and skills are formed. Therefore, growth requires time to perceive and use the same skills.
A temporary forced parent may work, but it will not accumulate skills. In our life and work, we may encounter various problems. Maybe we can use powerful Google or Baidu to find a solution in an instant. But why do we have little growth and little improvement in skills? The reason is that, without accumulation, it will naturally not be converted into skills.
To sum up, it is exactly what I decided and insisted on Writing blog posts. Maybe the blog is no longer a mainstream communication platform, or the blog may be replaced by other new things, but this is not what I want to consider. All I have to do isFind a piece of "Pure Land" to collect the details of daily life. As time passes, it will be converted into skills to cope with the challenges in life and work. That's all..
Remember: In this blog post, you want to record, analyze, and solve problems you encounter at work or in your life, and write your own insights. We hope to interact with like-minded people while providing our own aftertaste. If you have encountered the same problem at work or in your life, if you are not urgent, I hope you can read it carefully and write your own insights after solving the problem; if the solution in the blog is not suitable for your scenario, if you are interested, you can mail me the relevant information. Let's analyze and discuss it together, and finally write down the feelings of each other, grow together, and make progress together!
Background:
This series of blog posts stick to the previous conventions and are mainly used to record various problems encountered in the work, which are simple or cumbersome. Before detailed analysis, we should first find a solution to solve the pressing problem in our work. After some time, we will sort out the documents and PUSH them to the series of accumulated data. The content in this "step-by-step" series of blog posts is slightly scattered, and there is no relevance between the issues (of course, from the perspective of my actual project itself, there is still a relevance), from the DevExpress WinForm control, to Telerik OpenAccess ORM, and then to StarUML modeling, the problem is relatively easy to step on, hidden pitfalls, details are as follows.
Pitfall filling: 1) modify the BackColor of XtraTabControl
When using the XtraTabControl control of DevExpress, it is found that the BackColor of the XtraTabPage cannot be modified. It is Transparent in any case, as shown in:
In this case, we can see that the pages in the TabPage of XtraTabControl are white and transparent, which is not beautiful to use. The following results are displayed on Google or Baidu:
Try it and you will find that the BackColor of XtraTabPage cannot be modified. Finally, we found the solution in the omnipotent StackOverflow, which is very simple.
[Solution]:
According to the solution, the comparison chart before and after the modification is as follows, which obviously feels a lot more comfortable.
2) Use of Telerik OpenAccessContext
Previously, the blog post introduced how to use Telerik OpenAccess to operate SQLite databases. Today, we encountered a small problem in the actual application process. Later, after careful troubleshooting, we found that the problem was caused by our own project architecture. The problem is described as follows:
1) Overall project framework: The project contains three projects: ProjectA, ProjectB, and ProjectC. ProjectA is the database operation class library completed by using TelerikOpenAccess. ProjectB and ProjectC reference ProjectA at the same time. The specific application scenario of the project is to add, modify, and delete related databases in ProjectB, and query databases and display the UI in ProjectC.
2) Actual Problems: Projectband projectcare deployed for the Independent Application winfrom.exe. In the actual debugging process, ProjectB can successfully add, modify, and delete databases, but the query results in ProjectC are always returned as "null ". No exception was found in the Code for One-Step debugging to Telerik OpenAccess.
[Solution]: After a detailed comparison, a XXX. db database file exists in the projectb.exeand projectc.exe directories. The database file in the project TB directory has data in memory, while the database file in the Project TC directory is empty. The reason is that ProjectB and ProjectC call the constructor of the OpenAccessContext class when applying ProjectA for database operations:
public OpenAccessContext(string connectionString, BackendConfiguration backendConfiguration, MetadataContainer metadataContainer);
The connection strings used for database construction do not use absolute paths. Therefore, ProjectB and ProjectC call OpenAccessContext twice to create database files in the executable files directory of the corresponding project, therefore, the database is added, deleted, and modified, which is not the same as the database file used for query. Therefore, when the ProjectC project calls the ProjectA OpenAccessContext constructor, it gives an absolute path to the database connection string, for example
C: \ TelerikOpenAccess \ Sqlitetest \ ProjectB \ Debug \ X86 \ xxx. db. If yes, you can successfully implement the predefined functions.
3) differences between Diagram and Model of StarUML
UML is a required skill for software developers. It is used to construct a structure diagram, a sequence diagram, and a use case diagram during the preliminary design. It must be used to build a class diagram during later development. During the final deployment, it also needs to be deployed. UML can be used to describe each link. Recently, the traditional MS Viso tool has been abandoned, and StartUML has been used instead. It is instantly user-friendly and rich graph classes, simple operations are conquered, but they are still confused by the digoal and Model concepts of StarUML in their first use. The following describes the two concepts:
Model or (Software
Model is a description of all aspects of the system, such as structure, behavior, and requirement.
Digoal is Model (Software
Model. A Model can be represented by multiple digrams. Each divisor represents an aspect. For example, Diagram1 represents the inheritance relationship between classes (class diagrams ), diagram2 is used to represent the interaction (sequence diagram) between objects ).
In the StarUML Explorer window, you can see the relationship between various elements. You can roughly understand it by trying it.
Add digrams is used to Add visual graphs, such as inheritance graphs and sequence diagrams between common classes. Add is used to Add specific models, this model corresponds to the actual Class in our project, but cannot be visually displayed in StarUML.
For example, for Class digoal, in classdigoal, graphical symbols are used to visually Express each Class, for example, the inheritance relationship between classes, Class members, Class interfaces, Class attributes, etc. While Class is the abstraction of a specific thing, it is a theoretical modeling, indicating the relationship between each part. Give a specific classdi,
Each rectangle (visualized symbol) in the figure represents a Class, which corresponds to common code in C ++/C #/JAVA, such as the following sample code.
abstract class Book{public string ISBN;public string title;public int summary();public void publisher(string title);……}
The above content is shown in the StarUML Explorer window as follows:
From this we can see that in the classdigoal object, we place a rectangle visual symbol to represent the abstract class Book, and the corresponding Book class definition model is given below the classdigoal In the Explorer window, list its attributes and operations. From this we can see that classdigoal intuitively and visually shows each type defined in its lower.
PS:In addition, note the differences between the Delete and Delete from Model operations when operating StarUML. Through the above analysis, we can roughly understand the specific functions of the two operations. The Delete operation is completed with the 'del 'key, used to Delete the visualized symbols in digoal, such as classdigoal, that is, the rectangle in, however, this operation does not Delete the Book class Model in the StarUML Explorer, while the Delete from Model operation deletes the class Model in the Explorer window of StarUML while deleting the visual symbols in digoal. Pay attention to the specific usage.
By zssure@163.com
Time: